home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-06-04 | 17.1 KB | [ TEXT/MMCC]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
You can browse this item here: dnr.c
id metadata key value macFileType [ TEXT] macFileCreator [ MMCC]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 05 64 6e 72 2e 63 00 | 00 00 00 00 00 00 00 00 |..dnr.c.|........| |00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......| |00000050| 00 00 00 00 00 41 e9 00 | 00 01 9a ab f8 17 69 ab |.....A..|......i.| |00000060| f8 17 69 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..i.....|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a0 4e 00 00 |........|.....N..| |00000080| 2f 2a 0d 20 20 20 20 44 | 4e 52 2e 63 20 2d 20 44 |/*. D|NR.c - D| |00000090| 4e 52 20 6c 69 62 72 61 | 72 79 20 66 6f 72 20 4d |NR libra|ry for M| |000000a0| 50 57 0d 0d 20 20 20 20 | a9 20 43 6f 70 79 72 69 |PW.. |. Copyri| |000000b0| 67 68 74 20 31 39 38 38 | 20 62 79 20 41 70 70 6c |ght 1988| by Appl| |000000c0| 65 20 43 6f 6d 70 75 74 | 65 72 2e 20 20 41 6c 6c |e Comput|er. All| |000000d0| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved| |000000e0| 2e 0d 20 20 20 20 50 6f | 77 65 72 50 43 20 63 6f |.. Po|werPC co| |000000f0| 72 72 65 63 74 69 6f 6e | 73 20 62 79 20 45 72 69 |rrection|s by Eri| |00000100| 63 20 53 63 6f 75 74 65 | 6e 2c 20 44 65 63 65 6d |c Scoute|n, Decem| |00000110| 62 65 72 20 32 2c 20 31 | 39 39 34 2e 0d 0d 2a 2f |ber 2, 1|994...*/| |00000120| 0d 0d 23 64 65 66 69 6e | 65 20 4d 50 57 33 2e 30 |..#defin|e MPW3.0| |00000130| 0d 0d 23 69 6e 63 6c 75 | 64 65 20 3c 4f 53 55 74 |..#inclu|de <OSUt| |00000140| 69 6c 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ils.h>.#|include | |00000150| 3c 45 72 72 6f 72 73 2e | 68 3e 0d 23 69 6e 63 6c |<Errors.|h>.#incl| |00000160| 75 64 65 20 3c 46 69 6c | 65 73 2e 68 3e 0d 23 69 |ude <Fil|es.h>.#i| |00000170| 6e 63 6c 75 64 65 20 3c | 52 65 73 6f 75 72 63 65 |nclude <|Resource| |00000180| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 4d |s.h>.#in|clude <M| |00000190| 65 6d 6f 72 79 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |emory.h>|.#includ| |000001a0| 65 20 3c 54 72 61 70 73 | 2e 68 3e 0d 23 69 6e 63 |e <Traps|.h>.#inc| |000001b0| 6c 75 64 65 20 3c 47 65 | 73 74 61 6c 74 2e 68 3e |lude <Ge|stalt.h>| |000001c0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 46 6f 6c 64 65 |.#includ|e <Folde| |000001d0| 72 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |rs.h>.#i|nclude <| |000001e0| 4d 69 78 65 64 4d 6f 64 | 65 2e 68 3e 0d 0d 23 70 |MixedMod|e.h>..#p| |000001f0| 72 61 67 6d 61 20 72 65 | 71 75 69 72 65 5f 70 72 |ragma re|quire_pr| |00000200| 6f 74 6f 74 79 70 65 73 | 20 6f 66 66 0d 23 70 72 |ototypes| off.#pr| |00000210| 61 67 6d 61 20 63 70 6c | 75 73 70 6c 75 73 20 6f |agma cpl|usplus o| |00000220| 66 66 0d 0d 0d 23 64 65 | 66 69 6e 65 20 4f 50 45 |ff...#de|fine OPE| |00000230| 4e 52 45 53 4f 4c 56 45 | 52 20 20 20 20 31 4c 0d |NRESOLVE|R 1L.| |00000240| 23 64 65 66 69 6e 65 20 | 43 4c 4f 53 45 52 45 53 |#define |CLOSERES| |00000250| 4f 4c 56 45 52 20 20 20 | 32 4c 0d 23 64 65 66 69 |OLVER |2L.#defi| |00000260| 6e 65 20 53 54 52 54 4f | 41 44 44 52 20 20 20 20 |ne STRTO|ADDR | |00000270| 20 20 20 33 4c 0d 23 64 | 65 66 69 6e 65 20 41 44 | 3L.#d|efine AD| |00000280| 44 52 54 4f 53 54 52 20 | 20 20 20 20 20 20 34 4c |DRTOSTR | 4L| |00000290| 0d 23 64 65 66 69 6e 65 | 20 45 4e 55 4d 43 41 43 |.#define| ENUMCAC| |000002a0| 48 45 20 20 20 20 20 20 | 20 35 4c 0d 23 64 65 66 |HE | 5L.#def| |000002b0| 69 6e 65 20 41 44 44 52 | 54 4f 4e 41 4d 45 20 20 |ine ADDR|TONAME | |000002c0| 20 20 20 20 36 4c 0d 23 | 64 65 66 69 6e 65 20 48 | 6L.#|define H| |000002d0| 49 4e 46 4f 20 20 20 20 | 20 20 20 20 20 20 20 37 |INFO | 7| |000002e0| 4c 0d 23 64 65 66 69 6e | 65 20 4d 58 49 4e 46 4f |L.#defin|e MXINFO| |000002f0| 20 20 20 20 20 20 20 20 | 20 20 38 4c 0d 0d 48 61 | | 8L..Ha| |00000300| 6e 64 6c 65 20 20 20 20 | 20 20 20 20 20 20 20 20 |ndle | | |00000310| 20 20 63 6f 64 65 48 6e | 64 6c 20 3d 20 6e 69 6c | codeHn|dl = nil| |00000320| 3b 0d 55 6e 69 76 65 72 | 73 61 6c 50 72 6f 63 50 |;.Univer|salProcP| |00000330| 74 72 20 20 20 20 64 6e | 72 20 3d 20 6e 69 6c 3b |tr dn|r = nil;| |00000340| 0d 0d 0d 54 72 61 70 54 | 79 70 65 20 47 65 74 54 |...TrapT|ype GetT| |00000350| 72 61 70 54 79 70 65 28 | 74 68 65 54 72 61 70 29 |rapType(|theTrap)| |00000360| 0d 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 74 |.unsigne|d long t| |00000370| 68 65 54 72 61 70 3b 0d | 7b 0d 20 20 20 20 69 66 |heTrap;.|{. if| |00000380| 20 28 42 69 74 41 6e 64 | 28 74 68 65 54 72 61 70 | (BitAnd|(theTrap| |00000390| 2c 20 30 78 30 38 30 30 | 29 20 3e 20 30 29 0d 20 |, 0x0800|) > 0). | |000003a0| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 28 54 6f | r|eturn(To| |000003b0| 6f 6c 54 72 61 70 29 3b | 0d 20 20 20 20 65 6c 73 |olTrap);|. els| |000003c0| 65 0d 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |e. | return| |000003d0| 28 4f 53 54 72 61 70 29 | 3b 0d 20 20 20 20 7d 0d |(OSTrap)|;. }.| |000003e0| 0d 42 6f 6f 6c 65 61 6e | 20 54 72 61 70 41 76 61 |.Boolean| TrapAva| |000003f0| 69 6c 61 62 6c 65 28 74 | 72 61 70 29 0d 75 6e 73 |ilable(t|rap).uns| |00000400| 69 67 6e 65 64 20 6c 6f | 6e 67 20 74 72 61 70 3b |igned lo|ng trap;| |00000410| 0d 7b 0d 54 72 61 70 54 | 79 70 65 20 74 72 61 70 |.{.TrapT|ype trap| |00000420| 54 79 70 65 20 3d 20 54 | 6f 6f 6c 54 72 61 70 3b |Type = T|oolTrap;| |00000430| 0d 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 6e |.unsigne|d long n| |00000440| 75 6d 54 6f 6f 6c 42 6f | 78 54 72 61 70 73 3b 0d |umToolBo|xTraps;.| |00000450| 0d 20 20 20 20 69 66 20 | 28 4e 47 65 74 54 72 61 |. if |(NGetTra| |00000460| 70 41 64 64 72 65 73 73 | 28 5f 49 6e 69 74 47 72 |pAddress|(_InitGr| |00000470| 61 66 2c 20 54 6f 6f 6c | 54 72 61 70 29 20 3d 3d |af, Tool|Trap) ==| |00000480| 20 4e 47 65 74 54 72 61 | 70 41 64 64 72 65 73 73 | NGetTra|pAddress| |00000490| 28 30 78 41 41 36 45 2c | 20 54 6f 6f 6c 54 72 61 |(0xAA6E,| ToolTra| |000004a0| 70 29 29 0d 20 20 20 20 | 20 20 20 20 6e 75 6d 54 |p)). | numT| |000004b0| 6f 6f 6c 42 6f 78 54 72 | 61 70 73 20 3d 20 30 78 |oolBoxTr|aps = 0x| |000004c0| 32 30 30 3b 0d 20 20 20 | 20 65 6c 73 65 0d 20 20 |200;. | else. | |000004d0| 20 20 20 20 20 20 6e 75 | 6d 54 6f 6f 6c 42 6f 78 | nu|mToolBox| |000004e0| 54 72 61 70 73 20 3d 20 | 30 78 34 30 30 3b 0d 0d |Traps = |0x400;..| |000004f0| 20 20 20 20 74 72 61 70 | 54 79 70 65 20 3d 20 47 | trap|Type = G| |00000500| 65 74 54 72 61 70 54 79 | 70 65 28 74 72 61 70 29 |etTrapTy|pe(trap)| |00000510| 3b 0d 20 20 20 20 69 66 | 20 28 74 72 61 70 54 79 |;. if| (trapTy| |00000520| 70 65 20 3d 3d 20 54 6f | 6f 6c 54 72 61 70 29 20 |pe == To|olTrap) | |00000530| 7b 0d 20 20 20 20 20 20 | 20 20 74 72 61 70 20 3d |{. | trap =| |00000540| 20 42 69 74 41 6e 64 28 | 74 72 61 70 2c 20 30 78 | BitAnd(|trap, 0x| |00000550| 30 37 46 46 29 3b 0d 20 | 20 20 20 20 20 20 20 69 |07FF);. | i| |00000560| 66 20 28 74 72 61 70 20 | 3e 3d 20 6e 75 6d 54 6f |f (trap |>= numTo| |00000570| 6f 6c 42 6f 78 54 72 61 | 70 73 29 0d 20 20 20 20 |olBoxTra|ps). | |00000580| 20 20 20 20 20 20 20 20 | 74 72 61 70 20 3d 20 5f | |trap = _| |00000590| 55 6e 69 6d 70 6c 65 6d | 65 6e 74 65 64 3b 0d 20 |Unimplem|ented;. | |000005a0| 20 20 20 20 20 20 20 7d | 0d 20 20 20 20 72 65 74 | }|. ret| |000005b0| 75 72 6e 28 4e 47 65 74 | 54 72 61 70 41 64 64 72 |urn(NGet|TrapAddr| |000005c0| 65 73 73 28 74 72 61 70 | 2c 20 74 72 61 70 54 79 |ess(trap|, trapTy| |000005d0| 70 65 29 20 21 3d 20 4e | 47 65 74 54 72 61 70 41 |pe) != N|GetTrapA| |000005e0| 64 64 72 65 73 73 28 5f | 55 6e 69 6d 70 6c 65 6d |ddress(_|Unimplem| |000005f0| 65 6e 74 65 64 2c 20 54 | 6f 6f 6c 54 72 61 70 29 |ented, T|oolTrap)| |00000600| 29 3b 0d 0d 7d 0d 0d 76 | 6f 69 64 20 47 65 74 53 |);..}..v|oid GetS| |00000610| 79 73 74 65 6d 46 6f 6c | 64 65 72 28 73 68 6f 72 |ystemFol|der(shor| |00000620| 74 20 2a 76 52 65 66 4e | 75 6d 50 2c 20 6c 6f 6e |t *vRefN|umP, lon| |00000630| 67 20 2a 64 69 72 49 44 | 50 29 0d 7b 0d 20 20 20 |g *dirID|P).{. | |00000640| 20 53 79 73 45 6e 76 52 | 65 63 20 69 6e 66 6f 3b | SysEnvR|ec info;| |00000650| 0d 20 20 20 20 6c 6f 6e | 67 20 77 64 50 72 6f 63 |. lon|g wdProc| |00000660| 49 44 3b 0d 0d 20 20 20 | 20 53 79 73 45 6e 76 69 |ID;.. | SysEnvi| |00000670| 72 6f 6e 73 28 31 2c 20 | 26 69 6e 66 6f 29 3b 0d |rons(1, |&info);.| |00000680| 20 20 20 20 69 66 20 28 | 47 65 74 57 44 49 6e 66 | if (|GetWDInf| |00000690| 6f 28 69 6e 66 6f 2e 73 | 79 73 56 52 65 66 4e 75 |o(info.s|ysVRefNu| |000006a0| 6d 2c 20 76 52 65 66 4e | 75 6d 50 2c 20 64 69 72 |m, vRefN|umP, dir| |000006b0| 49 44 50 2c 20 26 77 64 | 50 72 6f 63 49 44 29 20 |IDP, &wd|ProcID) | |000006c0| 21 3d 20 6e 6f 45 72 72 | 29 20 7b 0d 20 20 20 20 |!= noErr|) {. | |000006d0| 20 20 20 20 2a 76 52 65 | 66 4e 75 6d 50 20 3d 20 | *vRe|fNumP = | |000006e0| 30 3b 0d 20 20 20 20 20 | 20 20 20 2a 64 69 72 49 |0;. | *dirI| |000006f0| 44 50 20 3d 20 30 3b 0d | 20 20 20 20 20 20 20 20 |DP = 0;.| | |00000700| 7d 0d 20 20 20 20 7d 0d | 0d 76 6f 69 64 20 47 65 |}. }.|.void Ge| |00000710| 74 43 50 61 6e 65 6c 46 | 6f 6c 64 65 72 28 73 68 |tCPanelF|older(sh| |00000720| 6f 72 74 20 2a 76 52 65 | 66 4e 75 6d 50 2c 20 6c |ort *vRe|fNumP, l| |00000730| 6f 6e 67 20 2a 64 69 72 | 49 44 50 29 0d 7b 0d 20 |ong *dir|IDP).{. | |00000740| 20 20 20 42 6f 6f 6c 65 | 61 6e 20 68 61 73 46 6f | Boole|an hasFo| |00000750| 6c 64 65 72 4d 67 72 20 | 3d 20 66 61 6c 73 65 3b |lderMgr |= false;| |00000760| 0d 20 20 20 20 6c 6f 6e | 67 20 66 65 61 74 75 72 |. lon|g featur| |00000770| 65 3b 0d 0d 20 20 20 20 | 69 66 20 28 47 65 73 74 |e;.. |if (Gest| |00000780| 61 6c 74 28 67 65 73 74 | 61 6c 74 46 69 6e 64 46 |alt(gest|altFindF| |00000790| 6f 6c 64 65 72 41 74 74 | 72 2c 20 26 66 65 61 74 |olderAtt|r, &feat| |000007a0| 75 72 65 29 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 20 |ure) == |noErr). | |000007b0| 20 20 20 20 20 20 20 68 | 61 73 46 6f 6c 64 65 72 | h|asFolder| |000007c0| 4d 67 72 20 3d 20 74 72 | 75 65 3b 0d 20 20 20 20 |Mgr = tr|ue;. | |000007d0| 69 66 20 28 21 68 61 73 | 46 6f 6c 64 65 72 4d 67 |if (!has|FolderMg| |000007e0| 72 29 20 7b 0d 20 20 20 | 20 20 20 20 20 47 65 74 |r) {. | Get| |000007f0| 53 79 73 74 65 6d 46 6f | 6c 64 65 72 28 76 52 65 |SystemFo|lder(vRe| |00000800| 66 4e 75 6d 50 2c 20 64 | 69 72 49 44 50 29 3b 0d |fNumP, d|irIDP);.| |00000810| 20 20 20 20 20 20 20 20 | 72 65 74 75 72 6e 3b 0d | |return;.| |00000820| 20 20 20 20 20 20 20 20 | 7d 0d 20 20 20 20 65 6c | |}. el| |00000830| 73 65 20 7b 0d 20 20 20 | 20 20 20 20 20 69 66 20 |se {. | if | |00000840| 28 46 69 6e 64 46 6f 6c | 64 65 72 28 6b 4f 6e 53 |(FindFol|der(kOnS| |00000850| 79 73 74 65 6d 44 69 73 | 6b 2c 20 6b 43 6f 6e 74 |ystemDis|k, kCont| |00000860| 72 6f 6c 50 61 6e 65 6c | 46 6f 6c 64 65 72 54 79 |rolPanel|FolderTy| |00000870| 70 65 2c 20 6b 44 6f 6e | 74 43 72 65 61 74 65 46 |pe, kDon|tCreateF| |00000880| 6f 6c 64 65 72 2c 20 76 | 52 65 66 4e 75 6d 50 2c |older, v|RefNumP,| |00000890| 20 64 69 72 49 44 50 29 | 20 21 3d 20 6e 6f 45 72 | dirIDP)| != noEr| |000008a0| 72 29 20 7b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |r) {. | | |000008b0| 20 2a 76 52 65 66 4e 75 | 6d 50 20 3d 20 30 3b 0d | *vRefNu|mP = 0;.| |000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 64 69 72 | | *dir| |000008d0| 49 44 50 20 3d 20 30 3b | 0d 20 20 20 20 20 20 20 |IDP = 0;|. | |000008e0| 20 20 20 20 20 7d 0d 20 | 20 20 20 20 20 20 20 7d | }. | }| |000008f0| 0d 20 20 20 20 7d 0d 0d | 2f 2a 20 53 65 61 72 63 |. }..|/* Searc| |00000900| 68 46 6f 6c 64 65 72 46 | 6f 72 44 4e 52 50 20 69 |hFolderF|orDNRP i| |00000910| 73 20 63 61 6c 6c 65 64 | 20 74 6f 20 73 65 61 72 |s called| to sear| |00000920| 63 68 20 61 20 66 6f 6c | 64 65 72 20 66 6f 72 20 |ch a fol|der for | |00000930| 66 69 6c 65 73 20 74 68 | 61 74 20 6d 69 67 68 74 |files th|at might| |00000940| 0d 20 20 20 20 63 6f 6e | 74 61 69 6e 20 74 68 65 |. con|tain the| |00000950| 20 27 64 6e 72 70 27 20 | 72 65 73 6f 75 72 63 65 | 'dnrp' |resource| |00000960| 20 2a 2f 0d 73 68 6f 72 | 74 20 53 65 61 72 63 68 | */.shor|t Search| |00000970| 46 6f 6c 64 65 72 46 6f | 72 44 4e 52 50 28 6c 6f |FolderFo|rDNRP(lo| |00000980| 6e 67 20 74 61 72 67 65 | 74 54 79 70 65 2c 20 6c |ng targe|tType, l| |00000990| 6f 6e 67 20 74 61 72 67 | 65 74 43 72 65 61 74 6f |ong targ|etCreato| |000009a0| 72 2c 20 73 68 6f 72 74 | 20 76 52 65 66 4e 75 6d |r, short| vRefNum| |000009b0| 2c 20 6c 6f 6e 67 20 64 | 69 72 49 44 29 0d 7b 0d |, long d|irID).{.| |000009c0| 20 20 20 20 48 50 61 72 | 61 6d 42 6c 6f 63 6b 52 | HPar|amBlockR| |000009d0| 65 63 20 66 69 3b 0d 20 | 20 20 20 53 74 72 32 35 |ec fi;. | Str25| |000009e0| 35 20 66 69 6c 65 6e 61 | 6d 65 3b 0d 20 20 20 20 |5 filena|me;. | |000009f0| 73 68 6f 72 74 20 72 65 | 66 6e 75 6d 3b 0d 0d 20 |short re|fnum;.. | |00000a00| 20 20 20 66 69 2e 66 69 | 6c 65 50 61 72 61 6d 2e | fi.fi|leParam.| |00000a10| 69 6f 43 6f 6d 70 6c 65 | 74 69 6f 6e 20 3d 20 6e |ioComple|tion = n| |00000a20| 69 6c 3b 0d 20 20 20 20 | 66 69 2e 66 69 6c 65 50 |il;. |fi.fileP| |00000a30| 61 72 61 6d 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |aram.ioN|amePtr =| |00000a40| 20 66 69 6c 65 6e 61 6d | 65 3b 0d 20 20 20 20 66 | filenam|e;. f| |00000a50| 69 2e 66 69 6c 65 50 61 | 72 61 6d 2e 69 6f 56 52 |i.filePa|ram.ioVR| |00000a60| 65 66 4e 75 6d 20 3d 20 | 76 52 65 66 4e 75 6d 3b |efNum = |vRefNum;| |00000a70| 0d 20 20 20 20 66 69 2e | 66 69 6c 65 50 61 72 61 |. fi.|filePara| |00000a80| 6d 2e 69 6f 44 69 72 49 | 44 20 3d 20 64 69 72 49 |m.ioDirI|D = dirI| |00000a90| 44 3b 0d 20 20 20 20 66 | 69 2e 66 69 6c 65 50 61 |D;. f|i.filePa| |00000aa0| 72 61 6d 2e 69 6f 46 44 | 69 72 49 6e 64 65 78 20 |ram.ioFD|irIndex | |00000ab0| 3d 20 31 3b 0d 0d 20 20 | 20 20 77 68 69 6c 65 20 |= 1;.. | while | |00000ac0| 28 50 42 48 47 65 74 46 | 49 6e 66 6f 28 26 66 69 |(PBHGetF|Info(&fi| |00000ad0| 2c 20 66 61 6c 73 65 29 | 20 3d 3d 20 6e 6f 45 72 |, false)| == noEr| |00000ae0| 72 29 20 7b 0d 20 20 20 | 20 20 20 20 20 2f 2a 20 |r) {. | /* | |00000af0| 73 63 61 6e 20 73 79 73 | 74 65 6d 20 66 6f 6c 64 |scan sys|tem fold| |00000b00| 65 72 20 66 6f 72 20 64 | 72 69 76 65 72 20 72 65 |er for d|river re| |00000b10| 73 6f 75 72 63 65 20 66 | 69 6c 65 73 20 6f 66 20 |source f|iles of | |00000b20| 73 70 65 63 69 66 69 63 | 20 74 79 70 65 20 26 20 |specific| type & | |00000b30| 63 72 65 61 74 6f 72 20 | 2a 2f 0d 20 20 20 20 20 |creator |*/. | |00000b40| 20 20 20 69 66 20 28 66 | 69 2e 66 69 6c 65 50 61 | if (f|i.filePa| |00000b50| 72 61 6d 2e 69 6f 46 6c | 46 6e 64 72 49 6e 66 6f |ram.ioFl|FndrInfo| |00000b60| 2e 66 64 54 79 70 65 20 | 3d 3d 20 74 61 72 67 65 |.fdType |== targe| |00000b70| 74 54 79 70 65 20 26 26 | 0d 20 20 20 20 20 20 20 |tType &&|. | |00000b80| 20 20 20 20 20 66 69 2e | 66 69 6c 65 50 61 72 61 | fi.|filePara| |00000b90| 6d 2e 69 6f 46 6c 46 6e | 64 72 49 6e 66 6f 2e 66 |m.ioFlFn|drInfo.f| |00000ba0| 64 43 72 65 61 74 6f 72 | 20 3d 3d 20 74 61 72 67 |dCreator| == targ| |00000bb0| 65 74 43 72 65 61 74 6f | 72 29 20 7b 0d 20 20 20 |etCreato|r) {. | |00000bc0| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 66 6f 75 6e | | /* foun| |00000bd0| 64 20 74 68 65 20 4d 61 | 63 54 43 50 20 64 72 69 |d the Ma|cTCP dri| |00000be0| 76 65 72 20 66 69 6c 65 | 3f 20 2a 2f 0d 20 20 20 |ver file|? */. | |00000bf0| 20 20 20 20 20 20 20 20 | 20 72 65 66 6e 75 6d 20 | | refnum | |00000c00| 3d 20 48 4f 70 65 6e 52 | 65 73 46 69 6c 65 28 76 |= HOpenR|esFile(v| |00000c10| 52 65 66 4e 75 6d 2c 20 | 64 69 72 49 44 2c 20 66 |RefNum, |dirID, f| |00000c20| 69 6c 65 6e 61 6d 65 2c | 20 66 73 52 64 50 65 72 |ilename,| fsRdPer| |00000c30| 6d 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |m);. | | |00000c40| 69 66 20 28 47 65 74 49 | 6e 64 52 65 73 6f 75 72 |if (GetI|ndResour| |00000c50| 63 65 28 27 64 6e 72 70 | 27 2c 20 31 29 20 3d 3d |ce('dnrp|', 1) ==| |00000c60| 20 4e 55 4c 4c 29 0d 20 | 20 20 20 20 20 20 20 20 | NULL). | | |00000c70| 20 20 20 20 20 20 20 43 | 6c 6f 73 65 52 65 73 46 | C|loseResF| |00000c80| 69 6c 65 28 72 65 66 6e | 75 6d 29 3b 0d 20 20 20 |ile(refn|um);. | |00000c90| 20 20 20 20 20 20 20 20 | 20 65 6c 73 65 0d 20 20 | | else. | |00000ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 72 65 | | re| |00000cb0| 74 75 72 6e 20 72 65 66 | 6e 75 6d 3b 0d 20 20 20 |turn ref|num;. | |00000cc0| 20 20 20 20 20 20 20 20 | 20 7d 0d 20 20 20 20 20 | | }. | |00000cd0| 20 20 20 2f 2a 20 63 68 | 65 63 6b 20 6e 65 78 74 | /* ch|eck next| |00000ce0| 20 66 69 6c 65 20 69 6e | 20 73 79 73 74 65 6d 20 | file in| system | |00000cf0| 66 6f 6c 64 65 72 20 2a | 2f 0d 20 20 20 20 20 20 |folder *|/. | |00000d00| 20 20 66 69 2e 66 69 6c | 65 50 61 72 61 6d 2e 69 | fi.fil|eParam.i| |00000d10| 6f 46 44 69 72 49 6e 64 | 65 78 2b 2b 3b 0d 20 20 |oFDirInd|ex++;. | |00000d20| 20 20 20 20 20 20 66 69 | 2e 66 69 6c 65 50 61 72 | fi|.filePar| |00000d30| 61 6d 2e 69 6f 44 69 72 | 49 44 20 3d 20 64 69 72 |am.ioDir|ID = dir| |00000d40| 49 44 3b 20 20 20 2f 2a | 20 50 42 48 47 65 74 46 |ID; /*| PBHGetF| |00000d50| 49 6e 66 6f 28 29 20 63 | 6c 6f 62 62 65 72 73 20 |Info() c|lobbers | |00000d60| 69 6f 44 69 72 49 44 20 | 2a 2f 0d 20 20 20 20 20 |ioDirID |*/. | |00000d70| 20 20 20 7d 0d 20 20 20 | 20 72 65 74 75 72 6e 28 | }. | return(| |00000d80| 2d 31 29 3b 0d 20 20 20 | 20 7d 0d 0d 0d 0d 2f 2a |-1);. | }..../*| |00000d90| 20 4f 70 65 6e 4f 75 72 | 52 46 20 69 73 20 63 61 | OpenOur|RF is ca| |00000da0| 6c 6c 65 64 20 74 6f 20 | 6f 70 65 6e 20 74 68 65 |lled to |open the| |00000db0| 20 4d 61 63 54 43 50 20 | 64 72 69 76 65 72 20 72 | MacTCP |driver r| |00000dc0| 65 73 6f 75 72 63 65 73 | 20 2a 2f 0d 0d 73 68 6f |esources| */..sho| |00000dd0| 72 74 20 4f 70 65 6e 4f | 75 72 52 46 28 29 0d 7b |rt OpenO|urRF().{| |00000de0| 0d 20 20 20 20 73 68 6f | 72 74 20 72 65 66 6e 75 |. sho|rt refnu| |00000df0| 6d 3b 0d 20 20 20 20 73 | 68 6f 72 74 20 76 52 65 |m;. s|hort vRe| |00000e00| 66 4e 75 6d 3b 0d 20 20 | 20 20 6c 6f 6e 67 20 64 |fNum;. | long d| |00000e10| 69 72 49 44 3b 0d 0d 20 | 20 20 20 2f 2a 20 66 69 |irID;.. | /* fi| |00000e20| 72 73 74 20 73 65 61 72 | 63 68 20 43 6f 6e 74 72 |rst sear|ch Contr| |00000e30| 6f 6c 20 50 61 6e 65 6c | 73 20 66 6f 72 20 4d 61 |ol Panel|s for Ma| |00000e40| 63 54 43 50 20 31 2e 31 | 20 2a 2f 0d 20 20 20 20 |cTCP 1.1| */. | |00000e50| 47 65 74 43 50 61 6e 65 | 6c 46 6f 6c 64 65 72 28 |GetCPane|lFolder(| |00000e60| 26 76 52 65 66 4e 75 6d | 2c 20 26 64 69 72 49 44 |&vRefNum|, &dirID| |00000e70| 29 3b 0d 20 20 20 20 72 | 65 66 6e 75 6d 20 3d 20 |);. r|efnum = | |00000e80| 53 65 61 72 63 68 46 6f | 6c 64 65 72 46 6f 72 44 |SearchFo|lderForD| |00000e90| 4e 52 50 28 27 63 64 65 | 76 27 2c 20 27 7a 74 63 |NRP('cde|v', 'ztc| |00000ea0| 70 27 2c 20 76 52 65 66 | 4e 75 6d 2c 20 64 69 72 |p', vRef|Num, dir| |00000eb0| 49 44 29 3b 0d 20 20 20 | 20 69 66 20 28 72 65 66 |ID);. | if (ref| |00000ec0| 6e 75 6d 20 21 3d 20 2d | 31 29 20 72 65 74 75 72 |num != -|1) retur| |00000ed0| 6e 28 72 65 66 6e 75 6d | 29 3b 0d 0d 20 20 20 20 |n(refnum|);.. | |00000ee0| 2f 2a 20 6e 65 78 74 20 | 73 65 61 72 63 68 20 53 |/* next |search S| |00000ef0| 79 73 74 65 6d 20 46 6f | 6c 64 65 72 20 66 6f 72 |ystem Fo|lder for| |00000f00| 20 4d 61 63 54 43 50 20 | 31 2e 30 2e 78 20 2a 2f | MacTCP |1.0.x */| |00000f10| 0d 20 20 20 20 47 65 74 | 53 79 73 74 65 6d 46 6f |. Get|SystemFo| |00000f20| 6c 64 65 72 28 26 76 52 | 65 66 4e 75 6d 2c 20 26 |lder(&vR|efNum, &| |00000f30| 64 69 72 49 44 29 3b 0d | 20 20 20 20 72 65 66 6e |dirID);.| refn| |00000f40| 75 6d 20 3d 20 53 65 61 | 72 63 68 46 6f 6c 64 65 |um = Sea|rchFolde| |00000f50| 72 46 6f 72 44 4e 52 50 | 28 27 63 64 65 76 27 2c |rForDNRP|('cdev',| |00000f60| 20 27 6d 74 63 70 27 2c | 20 76 52 65 66 4e 75 6d | 'mtcp',| vRefNum| |00000f70| 2c 20 64 69 72 49 44 29 | 3b 0d 20 20 20 20 69 66 |, dirID)|;. if| |00000f80| 20 28 72 65 66 6e 75 6d | 20 21 3d 20 2d 31 29 20 | (refnum| != -1) | |00000f90| 72 65 74 75 72 6e 28 72 | 65 66 6e 75 6d 29 3b 0d |return(r|efnum);.| |00000fa0| 0d 20 20 20 20 2f 2a 20 | 66 69 6e 61 6c 6c 79 2c |. /* |finally,| |00000fb0| 20 73 65 61 72 63 68 20 | 43 6f 6e 74 72 6f 6c 20 | search |Control | |00000fc0| 50 61 6e 65 6c 73 20 66 | 6f 72 20 4d 61 63 54 43 |Panels f|or MacTC| |00000fd0| 50 20 31 2e 30 2e 78 20 | 2a 2f 0d 20 20 20 20 47 |P 1.0.x |*/. G| |00000fe0| 65 74 43 50 61 6e 65 6c | 46 6f 6c 64 65 72 28 26 |etCPanel|Folder(&| |00000ff0| 76 52 65 66 4e 75 6d 2c | 20 26 64 69 72 49 44 29 |vRefNum,| &dirID)| |00001000| 3b 0d 20 20 20 20 72 65 | 66 6e 75 6d 20 3d 20 53 |;. re|fnum = S| |00001010| 65 61 72 63 68 46 6f 6c | 64 65 72 46 6f 72 44 4e |earchFol|derForDN| |00001020| 52 50 28 27 63 64 65 76 | 27 2c 20 27 6d 74 63 70 |RP('cdev|', 'mtcp| |00001030| 27 2c 20 76 52 65 66 4e | 75 6d 2c 20 64 69 72 49 |', vRefN|um, dirI| |00001040| 44 29 3b 0d 20 20 20 20 | 69 66 20 28 72 65 66 6e |D);. |if (refn| |00001050| 75 6d 20 21 3d 20 2d 31 | 29 20 72 65 74 75 72 6e |um != -1|) return| |00001060| 28 72 65 66 6e 75 6d 29 | 3b 0d 0d 20 20 20 20 72 |(refnum)|;.. r| |00001070| 65 74 75 72 6e 20 2d 31 | 3b 0d 20 20 20 20 7d 0d |eturn -1|;. }.| |00001080| 0d 0d 0d 0d 74 79 70 65 | 64 65 66 20 4f 53 45 72 |....type|def OSEr| |00001090| 72 20 28 2a 4f 70 65 6e | 52 65 73 6f 6c 76 65 72 |r (*Open|Resolver| |000010a0| 50 72 6f 63 50 74 72 29 | 28 6c 6f 6e 67 20 73 65 |ProcPtr)|(long se| |000010b0| 6c 65 63 74 6f 72 2c 20 | 63 68 61 72 2a 20 66 69 |lector, |char* fi| |000010c0| 6c 65 4e 61 6d 65 29 3b | 0d 0d 65 6e 75 6d 20 7b |leName);|..enum {| |000010d0| 0d 20 20 20 20 75 70 70 | 4f 70 65 6e 52 65 73 6f |. upp|OpenReso| |000010e0| 6c 76 65 72 50 72 6f 63 | 49 6e 66 6f 20 3d 20 6b |lverProc|Info = k| |000010f0| 43 53 74 61 63 6b 42 61 | 73 65 64 0d 20 20 20 20 |CStackBa|sed. | |00001100| 20 20 20 20 20 7c 20 52 | 45 53 55 4c 54 5f 53 49 | | R|ESULT_SI| |00001110| 5a 45 28 53 49 5a 45 5f | 43 4f 44 45 28 73 69 7a |ZE(SIZE_|CODE(siz| |00001120| 65 6f 66 28 6c 6f 6e 67 | 29 29 29 0d 20 20 20 20 |eof(long|))). | |00001130| 20 20 20 20 20 7c 20 53 | 54 41 43 4b 5f 52 4f 55 | | S|TACK_ROU| |00001140| 54 49 4e 45 5f 50 41 52 | 41 4d 45 54 45 52 28 31 |TINE_PAR|AMETER(1| |00001150| 2c 20 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |, SIZE_C|ODE(size| |00001160| 6f 66 28 73 68 6f 72 74 | 29 29 29 0d 20 20 20 20 |of(short|))). | |00001170| 20 20 20 20 20 7c 20 53 | 54 41 43 4b 5f 52 4f 55 | | S|TACK_ROU| |00001180| 54 49 4e 45 5f 50 41 52 | 41 4d 45 54 45 52 28 32 |TINE_PAR|AMETER(2| |00001190| 2c 20 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |, SIZE_C|ODE(size| |000011a0| 6f 66 28 63 68 61 72 20 | 2a 29 29 29 0d 7d 3b 0d |of(char |*))).};.| |000011b0| 0d 23 69 66 20 55 53 45 | 53 52 4f 55 54 49 4e 45 |.#if USE|SROUTINE| |000011c0| 44 45 53 43 52 49 50 54 | 4f 52 53 0d 74 79 70 65 |DESCRIPT|ORS.type| |000011d0| 64 65 66 20 55 6e 69 76 | 65 72 73 61 6c 50 72 6f |def Univ|ersalPro| |000011e0| 63 50 74 72 20 4f 70 65 | 6e 52 65 73 6f 6c 76 65 |cPtr Ope|nResolve| |000011f0| 72 55 50 50 3b 0d 0d 23 | 64 65 66 69 6e 65 20 4e |rUPP;..#|define N| |00001200| 65 77 4f 70 65 6e 52 65 | 73 6f 6c 76 65 72 50 72 |ewOpenRe|solverPr| |00001210| 6f 63 28 75 73 65 72 52 | 6f 75 74 69 6e 65 29 20 |oc(userR|outine) | |00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001230| 20 20 20 20 20 20 20 5c | 0d 20 20 20 20 20 20 20 | \|. | |00001240| 20 28 4f 70 65 6e 52 65 | 73 6f 6c 76 65 72 55 50 | (OpenRe|solverUP| |00001250| 50 29 20 4e 65 77 52 6f | 75 74 69 6e 65 44 65 73 |P) NewRo|utineDes| |00001260| 63 72 69 70 74 6f 72 28 | 75 73 65 72 52 6f 75 74 |criptor(|userRout| |00001270| 69 6e 65 2c 20 75 70 70 | 4f 70 65 6e 52 65 73 6f |ine, upp|OpenReso| |00001280| 6c 76 65 72 50 72 6f 63 | 49 6e 66 6f 2c 20 47 65 |lverProc|Info, Ge| |00001290| 74 43 75 72 72 65 6e 74 | 49 53 41 28 29 29 0d 23 |tCurrent|ISA()).#| |000012a0| 64 65 66 69 6e 65 20 43 | 61 6c 6c 4f 70 65 6e 52 |define C|allOpenR| |000012b0| 65 73 6f 6c 76 65 72 50 | 72 6f 63 28 75 73 65 72 |esolverP|roc(user| |000012c0| 52 6f 75 74 69 6e 65 2c | 20 73 65 6c 65 63 74 6f |Routine,| selecto| |000012d0| 72 2c 20 66 69 6c 65 6e | 61 6d 65 29 20 20 20 5c |r, filen|ame) \| |000012e0| 0d 20 20 20 20 20 20 20 | 20 43 61 6c 6c 55 6e 69 |. | CallUni| |000012f0| 76 65 72 73 61 6c 50 72 | 6f 63 28 75 73 65 72 52 |versalPr|oc(userR| |00001300| 6f 75 74 69 6e 65 2c 20 | 75 70 70 4f 70 65 6e 52 |outine, |uppOpenR| |00001310| 65 73 6f 6c 76 65 72 50 | 72 6f 63 49 6e 66 6f 2c |esolverP|rocInfo,| |00001320| 20 73 65 6c 65 63 74 6f | 72 2c 20 66 69 6c 65 6e | selecto|r, filen| |00001330| 61 6d 65 29 0d 23 65 6c | 73 65 0d 74 79 70 65 64 |ame).#el|se.typed| |00001340| 65 66 20 4f 70 65 6e 52 | 65 73 6f 6c 76 65 72 50 |ef OpenR|esolverP| |00001350| 72 6f 63 50 74 72 20 4f | 70 65 6e 52 65 73 6f 6c |rocPtr O|penResol| |00001360| 76 65 72 55 50 50 3b 0d | 0d 23 64 65 66 69 6e 65 |verUPP;.|.#define| |00001370| 20 4e 65 77 4f 70 65 6e | 52 65 73 6f 6c 76 65 72 | NewOpen|Resolver| |00001380| 50 72 6f 63 28 75 73 65 | 72 52 6f 75 74 69 6e 65 |Proc(use|rRoutine| |00001390| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | | |000013a0| 20 20 20 20 20 5c 0d 20 | 20 20 20 20 20 20 20 28 | \. | (| |000013b0| 4f 70 65 6e 52 65 73 6f | 6c 76 65 72 55 50 50 29 |OpenReso|lverUPP)| |000013c0| 28 75 73 65 72 52 6f 75 | 74 69 6e 65 29 0d 23 64 |(userRou|tine).#d| |000013d0| 65 66 69 6e 65 20 43 61 | 6c 6c 4f 70 65 6e 52 65 |efine Ca|llOpenRe| |000013e0| 73 6f 6c 76 65 72 50 72 | 6f 63 28 75 73 65 72 52 |solverPr|oc(userR| |000013f0| 6f 75 74 69 6e 65 2c 20 | 73 65 6c 65 63 74 6f 72 |outine, |selector| |00001400| 2c 20 66 69 6c 65 6e 61 | 6d 65 29 20 20 20 5c 0d |, filena|me) \.| |00001410| 20 20 20 20 20 20 20 20 | 28 2a 75 73 65 72 52 6f | |(*userRo| |00001420| 75 74 69 6e 65 29 28 73 | 65 6c 65 63 74 6f 72 2c |utine)(s|elector,| |00001430| 20 66 69 6c 65 6e 61 6d | 65 29 0d 23 65 6e 64 69 | filenam|e).#endi| |00001440| 66 0d 0d 0d 0d 2f 2a 70 | 61 73 63 61 6c 2a 2f 20 |f..../*p|ascal*/ | |00001450| 4f 53 45 72 72 20 4f 70 | 65 6e 52 65 73 6f 6c 76 |OSErr Op|enResolv| |00001460| 65 72 28 66 69 6c 65 4e | 61 6d 65 29 20 2f 2f 4d |er(fileN|ame) //M| |00001470| 44 54 0d 63 68 61 72 20 | 2a 66 69 6c 65 4e 61 6d |DT.char |*fileNam| |00001480| 65 3b 0d 7b 0d 20 20 20 | 20 73 68 6f 72 74 20 20 |e;.{. | short | |00001490| 20 20 20 20 20 20 20 20 | 20 72 65 66 6e 75 6d 3b | | refnum;| |000014a0| 0d 20 20 20 20 4f 53 45 | 72 72 20 20 20 20 20 20 |. OSE|rr | |000014b0| 20 20 20 20 20 72 63 3b | 0d 0d 20 20 20 20 69 66 | rc;|.. if| |000014c0| 20 28 64 6e 72 20 21 3d | 20 6e 69 6c 29 0d 20 20 | (dnr !=| nil). | |000014d0| 20 20 20 20 20 20 2f 2a | 20 72 65 73 6f 6c 76 65 | /*| resolve| |000014e0| 72 20 61 6c 72 65 61 64 | 79 20 6c 6f 61 64 65 64 |r alread|y loaded| |000014f0| 20 69 6e 20 2a 2f 0d 20 | 20 20 20 20 20 20 20 72 | in */. | r| |00001500| 65 74 75 72 6e 28 6e 6f | 45 72 72 29 3b 0d 0d 20 |eturn(no|Err);.. | |00001510| 20 20 20 2f 2a 20 6f 70 | 65 6e 20 74 68 65 20 4d | /* op|en the M| |00001520| 61 63 54 43 50 20 64 72 | 69 76 65 72 20 74 6f 20 |acTCP dr|iver to | |00001530| 67 65 74 20 44 4e 52 20 | 72 65 73 6f 75 72 63 65 |get DNR |resource| |00001540| 73 2e 20 53 65 61 72 63 | 68 20 66 6f 72 20 69 74 |s. Searc|h for it| |00001550| 20 62 61 73 65 64 20 6f | 6e 0d 20 20 20 20 20 20 | based o|n. | |00001560| 20 63 72 65 61 74 6f 72 | 20 26 20 74 79 70 65 20 | creator| & type | |00001570| 72 61 74 68 65 72 20 74 | 68 61 6e 20 73 69 6d 70 |rather t|han simp| |00001580| 6c 79 20 66 69 6c 65 20 | 6e 61 6d 65 20 2a 2f 0d |ly file |name */.| |00001590| 20 20 20 20 72 65 66 6e | 75 6d 20 3d 20 4f 70 65 | refn|um = Ope| |000015a0| 6e 4f 75 72 52 46 28 29 | 3b 0d 0d 20 20 20 20 2f |nOurRF()|;.. /| |000015b0| 2a 20 69 67 6e 6f 72 65 | 20 66 61 69 6c 75 72 65 |* ignore| failure| |000015c0| 73 20 73 69 6e 63 65 20 | 74 68 65 20 72 65 73 6f |s since |the reso| |000015d0| 75 72 63 65 20 6d 61 79 | 20 68 61 76 65 20 62 65 |urce may| have be| |000015e0| 65 6e 20 69 6e 73 74 61 | 6c 6c 65 64 20 69 6e 20 |en insta|lled in | |000015f0| 74 68 65 0d 20 20 20 20 | 20 20 20 53 79 73 74 65 |the. | Syste| |00001600| 6d 20 66 69 6c 65 20 69 | 66 20 72 75 6e 6e 69 6e |m file i|f runnin| |00001610| 67 20 6f 6e 20 61 20 4d | 61 63 20 35 31 32 4b 65 |g on a M|ac 512Ke| |00001620| 20 2a 2f 0d 0d 20 20 20 | 20 2f 2a 20 6c 6f 61 64 | */.. | /* load| |00001630| 20 69 6e 20 74 68 65 20 | 44 4e 52 20 72 65 73 6f | in the |DNR reso| |00001640| 75 72 63 65 20 70 61 63 | 6b 61 67 65 20 2a 2f 0d |urce pac|kage */.| |00001650| 20 20 20 20 63 6f 64 65 | 48 6e 64 6c 20 3d 20 47 | code|Hndl = G| |00001660| 65 74 49 6e 64 52 65 73 | 6f 75 72 63 65 28 27 64 |etIndRes|ource('d| |00001670| 6e 72 70 27 2c 20 31 29 | 3b 0d 20 20 20 20 69 66 |nrp', 1)|;. if| |00001680| 20 28 63 6f 64 65 48 6e | 64 6c 20 3d 3d 20 6e 69 | (codeHn|dl == ni| |00001690| 6c 29 20 7b 0d 20 20 20 | 20 20 20 20 20 2f 2a 20 |l) {. | /* | |000016a0| 63 61 6e 27 74 20 6f 70 | 65 6e 20 44 4e 52 20 2a |can't op|en DNR *| |000016b0| 2f 0d 20 20 20 20 20 20 | 20 20 72 65 74 75 72 6e |/. | return| |000016c0| 28 52 65 73 45 72 72 6f | 72 28 29 29 3b 0d 20 20 |(ResErro|r());. | |000016d0| 20 20 7d 0d 0d 20 20 20 | 20 44 65 74 61 63 68 52 | }.. | DetachR| |000016e0| 65 73 6f 75 72 63 65 28 | 63 6f 64 65 48 6e 64 6c |esource(|codeHndl| |000016f0| 29 3b 0d 20 20 20 20 69 | 66 20 28 72 65 66 6e 75 |);. i|f (refnu| |00001700| 6d 20 21 3d 20 2d 31 29 | 20 7b 0d 20 20 20 20 20 |m != -1)| {. | |00001710| 20 20 20 43 6c 6f 73 65 | 52 65 73 46 69 6c 65 28 | Close|ResFile(| |00001720| 72 65 66 6e 75 6d 29 3b | 0d 20 20 20 20 7d 0d 0d |refnum);|. }..| |00001730| 20 20 20 20 2f 2a 20 6c | 6f 63 6b 20 74 68 65 20 | /* l|ock the | |00001740| 44 4e 52 20 72 65 73 6f | 75 72 63 65 20 73 69 6e |DNR reso|urce sin| |00001750| 63 65 20 69 74 20 63 61 | 6e 6e 6f 74 20 62 65 20 |ce it ca|nnot be | |00001760| 72 65 6c 6f 61 74 65 64 | 20 77 68 69 6c 65 20 6f |reloated| while o| |00001770| 70 65 6e 65 64 20 2a 2f | 0d 20 20 20 20 48 4c 6f |pened */|. HLo| |00001780| 63 6b 28 63 6f 64 65 48 | 6e 64 6c 29 3b 0d 20 20 |ck(codeH|ndl);. | |00001790| 20 20 64 6e 72 20 3d 20 | 28 55 6e 69 76 65 72 73 | dnr = |(Univers| |000017a0| 61 6c 50 72 6f 63 50 74 | 72 29 20 2a 63 6f 64 65 |alProcPt|r) *code| |000017b0| 48 6e 64 6c 3b 0d 0d 20 | 20 20 20 2f 2a 20 63 61 |Hndl;.. | /* ca| |000017c0| 6c 6c 20 6f 70 65 6e 20 | 72 65 73 6f 6c 76 65 72 |ll open |resolver| |000017d0| 20 2a 2f 0d 20 20 20 20 | 72 63 20 3d 20 43 61 6c | */. |rc = Cal| |000017e0| 6c 4f 70 65 6e 52 65 73 | 6f 6c 76 65 72 50 72 6f |lOpenRes|olverPro| |000017f0| 63 28 28 4f 70 65 6e 52 | 65 73 6f 6c 76 65 72 55 |c((OpenR|esolverU| |00001800| 50 50 29 20 64 6e 72 2c | 20 4f 50 45 4e 52 45 53 |PP) dnr,| OPENRES| |00001810| 4f 4c 56 45 52 2c 20 66 | 69 6c 65 4e 61 6d 65 29 |OLVER, f|ileName)| |00001820| 3b 0d 20 20 20 20 69 66 | 20 28 72 63 20 21 3d 20 |;. if| (rc != | |00001830| 6e 6f 45 72 72 29 20 7b | 0d 20 20 20 20 20 20 20 |noErr) {|. | |00001840| 20 2f 2a 20 70 72 6f 62 | 6c 65 6d 20 77 69 74 68 | /* prob|lem with| |00001850| 20 6f 70 65 6e 20 72 65 | 73 6f 6c 76 65 72 2c 20 | open re|solver, | |00001860| 66 6c 75 73 68 20 69 74 | 20 2a 2f 0d 20 20 20 20 |flush it| */. | |00001870| 20 20 20 20 48 55 6e 6c | 6f 63 6b 28 63 6f 64 65 | HUnl|ock(code| |00001880| 48 6e 64 6c 29 3b 0d 20 | 20 20 20 20 20 20 20 44 |Hndl);. | D| |00001890| 69 73 70 6f 73 48 61 6e | 64 6c 65 28 63 6f 64 65 |isposHan|dle(code| |000018a0| 48 6e 64 6c 29 3b 0d 20 | 20 20 20 20 20 20 20 64 |Hndl);. | d| |000018b0| 6e 72 20 3d 20 6e 69 6c | 3b 0d 20 20 20 20 7d 0d |nr = nil|;. }.| |000018c0| 20 20 20 20 72 65 74 75 | 72 6e 28 72 63 29 3b 0d | retu|rn(rc);.| |000018d0| 7d 0d 0d 0d 0d 74 79 70 | 65 64 65 66 20 4f 53 45 |}....typ|edef OSE| |000018e0| 72 72 20 28 2a 43 6c 6f | 73 65 52 65 73 6f 6c 76 |rr (*Clo|seResolv| |000018f0| 65 72 50 72 6f 63 50 74 | 72 29 28 6c 6f 6e 67 20 |erProcPt|r)(long | |00001900| 73 65 6c 65 63 74 6f 72 | 29 3b 0d 0d 65 6e 75 6d |selector|);..enum| |00001910| 20 7b 0d 20 20 20 20 75 | 70 70 43 6c 6f 73 65 52 | {. u|ppCloseR| |00001920| 65 73 6f 6c 76 65 72 50 | 72 6f 63 49 6e 66 6f 20 |esolverP|rocInfo | |00001930| 3d 20 6b 43 53 74 61 63 | 6b 42 61 73 65 64 0d 20 |= kCStac|kBased. | |00001940| 20 20 20 20 20 20 20 20 | 7c 20 52 45 53 55 4c 54 | || RESULT| |00001950| 5f 53 49 5a 45 28 53 49 | 5a 45 5f 43 4f 44 45 28 |_SIZE(SI|ZE_CODE(| |00001960| 73 69 7a 65 6f 66 28 6c | 6f 6e 67 29 29 29 0d 20 |sizeof(l|ong))). | |00001970| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |00001980| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |00001990| 52 28 31 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(1, SIZ|E_CODE(s| |000019a0| 69 7a 65 6f 66 28 73 68 | 6f 72 74 29 29 29 0d 7d |izeof(sh|ort))).}| |000019b0| 3b 0d 0d 23 69 66 20 55 | 53 45 53 52 4f 55 54 49 |;..#if U|SESROUTI| |000019c0| 4e 45 44 45 53 43 52 49 | 50 54 4f 52 53 0d 74 79 |NEDESCRI|PTORS.ty| |000019d0| 70 65 64 65 66 20 55 6e | 69 76 65 72 73 61 6c 50 |pedef Un|iversalP| |000019e0| 72 6f 63 50 74 72 20 43 | 6c 6f 73 65 52 65 73 6f |rocPtr C|loseReso| |000019f0| 6c 76 65 72 55 50 50 3b | 0d 0d 23 64 65 66 69 6e |lverUPP;|..#defin| |00001a00| 65 20 4e 65 77 43 6c 6f | 73 65 52 65 73 6f 6c 76 |e NewClo|seResolv| |00001a10| 65 72 50 72 6f 63 28 75 | 73 65 72 52 6f 75 74 69 |erProc(u|serRouti| |00001a20| 6e 65 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ne) | | |00001a30| 20 20 20 20 20 20 20 20 | 20 20 5c 0d 20 20 20 20 | | \. | |00001a40| 20 20 20 20 28 43 6c 6f | 73 65 52 65 73 6f 6c 76 | (Clo|seResolv| |00001a50| 65 72 55 50 50 29 20 4e | 65 77 52 6f 75 74 69 6e |erUPP) N|ewRoutin| |00001a60| 65 44 65 73 63 72 69 70 | 74 6f 72 28 75 73 65 72 |eDescrip|tor(user| |00001a70| 52 6f 75 74 69 6e 65 2c | 20 75 70 70 43 6c 6f 73 |Routine,| uppClos| |00001a80| 65 52 65 73 6f 6c 76 65 | 72 50 72 6f 63 49 6e 66 |eResolve|rProcInf| |00001a90| 6f 2c 20 47 65 74 43 75 | 72 72 65 6e 74 49 53 41 |o, GetCu|rrentISA| |00001aa0| 28 29 29 0d 23 64 65 66 | 69 6e 65 20 43 61 6c 6c |()).#def|ine Call| |00001ab0| 43 6c 6f 73 65 52 65 73 | 6f 6c 76 65 72 50 72 6f |CloseRes|olverPro| |00001ac0| 63 28 75 73 65 72 52 6f | 75 74 69 6e 65 2c 20 73 |c(userRo|utine, s| |00001ad0| 65 6c 65 63 74 6f 72 29 | 20 20 20 20 5c 0d 20 20 |elector)| \. | |00001ae0| 20 20 20 20 20 20 43 61 | 6c 6c 55 6e 69 76 65 72 | Ca|llUniver| |00001af0| 73 61 6c 50 72 6f 63 28 | 75 73 65 72 52 6f 75 74 |salProc(|userRout| |00001b00| 69 6e 65 2c 20 75 70 70 | 43 6c 6f 73 65 52 65 73 |ine, upp|CloseRes| |00001b10| 6f 6c 76 65 72 50 72 6f | 63 49 6e 66 6f 2c 20 73 |olverPro|cInfo, s| |00001b20| 65 6c 65 63 74 6f 72 29 | 0d 23 65 6c 73 65 0d 74 |elector)|.#else.t| |00001b30| 79 70 65 64 65 66 20 43 | 6c 6f 73 65 52 65 73 6f |ypedef C|loseReso| |00001b40| 6c 76 65 72 50 72 6f 63 | 50 74 72 20 43 6c 6f 73 |lverProc|Ptr Clos| |00001b50| 65 52 65 73 6f 6c 76 65 | 72 55 50 50 3b 0d 0d 23 |eResolve|rUPP;..#| |00001b60| 64 65 66 69 6e 65 20 4e | 65 77 43 6c 6f 73 65 52 |define N|ewCloseR| |00001b70| 65 73 6f 6c 76 65 72 50 | 72 6f 63 28 75 73 65 72 |esolverP|roc(user| |00001b80| 52 6f 75 74 69 6e 65 29 | 20 20 20 20 20 20 20 20 |Routine)| | |00001b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \| |00001ba0| 0d 20 20 20 20 20 20 20 | 20 28 43 6c 6f 73 65 52 |. | (CloseR| |00001bb0| 65 73 6f 6c 76 65 72 55 | 50 50 29 28 75 73 65 72 |esolverU|PP)(user| |00001bc0| 52 6f 75 74 69 6e 65 29 | 0d 23 64 65 66 69 6e 65 |Routine)|.#define| |00001bd0| 20 43 61 6c 6c 43 6c 6f | 73 65 52 65 73 6f 6c 76 | CallClo|seResolv| |00001be0| 65 72 50 72 6f 63 28 75 | 73 65 72 52 6f 75 74 69 |erProc(u|serRouti| |00001bf0| 6e 65 2c 20 73 65 6c 65 | 63 74 6f 72 29 20 20 20 |ne, sele|ctor) | |00001c00| 20 5c 0d 20 20 20 20 20 | 20 20 20 28 2a 75 73 65 | \. | (*use| |00001c10| 72 52 6f 75 74 69 6e 65 | 29 28 73 65 6c 65 63 74 |rRoutine|)(select| |00001c20| 6f 72 29 0d 23 65 6e 64 | 69 66 0d 0d 0d 0d 2f 2a |or).#end|if..../*| |00001c30| 70 61 73 63 61 6c 2a 2f | 20 4f 53 45 72 72 20 43 |pascal*/| OSErr C| |00001c40| 6c 6f 73 65 52 65 73 6f | 6c 76 65 72 28 29 20 2f |loseReso|lver() /| |00001c50| 2f 4d 44 54 0d 7b 0d 20 | 20 20 20 69 66 20 28 64 |/MDT.{. | if (d| |00001c60| 6e 72 20 3d 3d 20 6e 69 | 6c 29 0d 20 20 20 20 20 |nr == ni|l). | |00001c70| 20 20 20 2f 2a 20 72 65 | 73 6f 6c 76 65 72 20 6e | /* re|solver n| |00001c80| 6f 74 20 6c 6f 61 64 65 | 64 20 65 72 72 6f 72 20 |ot loade|d error | |00001c90| 2a 2f 0d 20 20 20 20 20 | 20 20 20 72 65 74 75 72 |*/. | retur| |00001ca0| 6e 28 6e 6f 74 4f 70 65 | 6e 45 72 72 29 3b 0d 0d |n(notOpe|nErr);..| |00001cb0| 20 20 20 20 2f 2a 20 63 | 61 6c 6c 20 63 6c 6f 73 | /* c|all clos| |00001cc0| 65 20 72 65 73 6f 6c 76 | 65 72 20 2a 2f 0d 20 20 |e resolv|er */. | |00001cd0| 20 20 43 61 6c 6c 43 6c | 6f 73 65 52 65 73 6f 6c | CallCl|oseResol| |00001ce0| 76 65 72 50 72 6f 63 28 | 28 43 6c 6f 73 65 52 65 |verProc(|(CloseRe| |00001cf0| 73 6f 6c 76 65 72 55 50 | 50 29 20 64 6e 72 2c 20 |solverUP|P) dnr, | |00001d00| 43 4c 4f 53 45 52 45 53 | 4f 4c 56 45 52 29 3b 0d |CLOSERES|OLVER);.| |00001d10| 0d 20 20 20 20 2f 2a 20 | 72 65 6c 65 61 73 65 20 |. /* |release | |00001d20| 74 68 65 20 44 4e 52 20 | 72 65 73 6f 75 72 63 65 |the DNR |resource| |00001d30| 20 70 61 63 6b 61 67 65 | 20 2a 2f 0d 20 20 20 20 | package| */. | |00001d40| 48 55 6e 6c 6f 63 6b 28 | 63 6f 64 65 48 6e 64 6c |HUnlock(|codeHndl| |00001d50| 29 3b 0d 20 20 20 20 44 | 69 73 70 6f 73 48 61 6e |);. D|isposHan| |00001d60| 64 6c 65 28 63 6f 64 65 | 48 6e 64 6c 29 3b 0d 20 |dle(code|Hndl);. | |00001d70| 20 20 20 64 6e 72 20 3d | 20 6e 69 6c 3b 0d 20 20 | dnr =| nil;. | |00001d80| 20 20 72 65 74 75 72 6e | 28 6e 6f 45 72 72 29 3b | return|(noErr);| |00001d90| 0d 7d 0d 0d 0d 0d 0d 74 | 79 70 65 64 65 66 20 4f |.}.....t|ypedef O| |00001da0| 53 45 72 72 20 28 2a 53 | 74 72 54 6f 41 64 64 72 |SErr (*S|trToAddr| |00001db0| 50 72 6f 63 50 74 72 29 | 28 6c 6f 6e 67 20 73 65 |ProcPtr)|(long se| |00001dc0| 6c 65 63 74 6f 72 2c 20 | 63 68 61 72 2a 20 68 6f |lector, |char* ho| |00001dd0| 73 74 4e 61 6d 65 2c 20 | 73 74 72 75 63 74 20 68 |stName, |struct h| |00001de0| 6f 73 74 49 6e 66 6f 2a | 20 72 74 6e 53 74 72 75 |ostInfo*| rtnStru| |00001df0| 63 74 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ct,. | | |00001e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00001e10| 20 20 20 20 20 20 20 20 | 6c 6f 6e 67 20 72 65 73 | |long res| |00001e20| 75 6c 74 50 72 6f 63 2c | 20 63 68 61 72 2a 20 75 |ultProc,| char* u| |00001e30| 73 65 72 44 61 74 61 29 | 3b 0d 0d 65 6e 75 6d 20 |serData)|;..enum | |00001e40| 7b 0d 20 20 20 20 75 70 | 70 53 74 72 54 6f 41 64 |{. up|pStrToAd| |00001e50| 64 72 50 72 6f 63 49 6e | 66 6f 20 3d 20 6b 43 53 |drProcIn|fo = kCS| |00001e60| 74 61 63 6b 42 61 73 65 | 64 0d 20 20 20 20 20 20 |tackBase|d. | |00001e70| 20 20 20 7c 20 52 45 53 | 55 4c 54 5f 53 49 5a 45 | | RES|ULT_SIZE| |00001e80| 28 53 49 5a 45 5f 43 4f | 44 45 28 73 69 7a 65 6f |(SIZE_CO|DE(sizeo| |00001e90| 66 28 6c 6f 6e 67 29 29 | 29 0d 20 20 20 20 20 20 |f(long))|). | |00001ea0| 20 20 20 7c 20 53 54 41 | 43 4b 5f 52 4f 55 54 49 | | STA|CK_ROUTI| |00001eb0| 4e 45 5f 50 41 52 41 4d | 45 54 45 52 28 31 2c 20 |NE_PARAM|ETER(1, | |00001ec0| 53 49 5a 45 5f 43 4f 44 | 45 28 73 69 7a 65 6f 66 |SIZE_COD|E(sizeof| |00001ed0| 28 73 68 6f 72 74 29 29 | 29 0d 20 20 20 20 20 20 |(short))|). | |00001ee0| 20 20 20 7c 20 53 54 41 | 43 4b 5f 52 4f 55 54 49 | | STA|CK_ROUTI| |00001ef0| 4e 45 5f 50 41 52 41 4d | 45 54 45 52 28 32 2c 20 |NE_PARAM|ETER(2, | |00001f00| 53 49 5a 45 5f 43 4f 44 | 45 28 73 69 7a 65 6f 66 |SIZE_COD|E(sizeof| |00001f10| 28 63 68 61 72 20 2a 29 | 29 29 0d 20 20 20 20 20 |(char *)|)). | |00001f20| 20 20 20 20 7c 20 53 54 | 41 43 4b 5f 52 4f 55 54 | | ST|ACK_ROUT| |00001f30| 49 4e 45 5f 50 41 52 41 | 4d 45 54 45 52 28 33 2c |INE_PARA|METER(3,| |00001f40| 20 53 49 5a 45 5f 43 4f | 44 45 28 73 69 7a 65 6f | SIZE_CO|DE(sizeo| |00001f50| 66 28 73 74 72 75 63 74 | 20 68 6f 73 74 49 6e 66 |f(struct| hostInf| |00001f60| 6f 20 2a 29 29 29 0d 20 | 20 20 20 20 20 20 20 20 |o *))). | | |00001f70| 7c 20 53 54 41 43 4b 5f | 52 4f 55 54 49 4e 45 5f || STACK_|ROUTINE_| |00001f80| 50 41 52 41 4d 45 54 45 | 52 28 34 2c 20 53 49 5a |PARAMETE|R(4, SIZ| |00001f90| 45 5f 43 4f 44 45 28 73 | 69 7a 65 6f 66 28 6c 6f |E_CODE(s|izeof(lo| |00001fa0| 6e 67 29 29 29 0d 20 20 | 20 20 20 20 20 20 20 7c |ng))). | || |00001fb0| 20 53 54 41 43 4b 5f 52 | 4f 55 54 49 4e 45 5f 50 | STACK_R|OUTINE_P| |00001fc0| 41 52 41 4d 45 54 45 52 | 28 35 2c 20 53 49 5a 45 |ARAMETER|(5, SIZE| |00001fd0| 5f 43 4f 44 45 28 73 69 | 7a 65 6f 66 28 63 68 61 |_CODE(si|zeof(cha| |00001fe0| 72 20 2a 29 29 29 0d 7d | 3b 0d 0d 23 69 66 20 55 |r *))).}|;..#if U| |00001ff0| 53 45 53 52 4f 55 54 49 | 4e 45 44 45 53 43 52 49 |SESROUTI|NEDESCRI| |00002000| 50 54 4f 52 53 0d 74 79 | 70 65 64 65 66 20 55 6e |PTORS.ty|pedef Un| |00002010| 69 76 65 72 73 61 6c 50 | 72 6f 63 50 74 72 20 53 |iversalP|rocPtr S| |00002020| 74 72 54 6f 41 64 64 72 | 55 50 50 3b 0d 0d 23 64 |trToAddr|UPP;..#d| |00002030| 65 66 69 6e 65 20 4e 65 | 77 53 74 72 54 6f 41 64 |efine Ne|wStrToAd| |00002040| 64 72 50 72 6f 63 28 75 | 73 65 72 52 6f 75 74 69 |drProc(u|serRouti| |00002050| 6e 65 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ne) | | |00002060| 20 20 20 20 20 20 20 20 | 20 20 5c 0d 20 20 20 20 | | \. | |00002070| 20 20 20 20 28 53 74 72 | 54 6f 41 64 64 72 55 50 | (Str|ToAddrUP| |00002080| 50 29 20 4e 65 77 52 6f | 75 74 69 6e 65 44 65 73 |P) NewRo|utineDes| |00002090| 63 72 69 70 74 6f 72 28 | 75 73 65 72 52 6f 75 74 |criptor(|userRout| |000020a0| 69 6e 65 2c 20 75 70 70 | 53 74 72 54 6f 41 64 64 |ine, upp|StrToAdd| |000020b0| 72 50 72 6f 63 49 6e 66 | 6f 2c 20 47 65 74 43 75 |rProcInf|o, GetCu| |000020c0| 72 72 65 6e 74 49 53 41 | 28 29 29 0d 23 64 65 66 |rrentISA|()).#def| |000020d0| 69 6e 65 20 43 61 6c 6c | 53 74 72 54 6f 41 64 64 |ine Call|StrToAdd| |000020e0| 72 50 72 6f 63 28 75 73 | 65 72 52 6f 75 74 69 6e |rProc(us|erRoutin| |000020f0| 65 2c 20 73 65 6c 65 63 | 74 6f 72 2c 20 68 6f 73 |e, selec|tor, hos| |00002100| 74 4e 61 6d 65 2c 20 72 | 74 6e 53 74 72 75 63 74 |tName, r|tnStruct| |00002110| 2c 20 72 65 73 75 6c 74 | 50 72 6f 63 2c 20 75 73 |, result|Proc, us| |00002120| 65 72 44 61 74 61 29 20 | 5c 0d 20 20 20 20 20 20 |erData) |\. | |00002130| 20 20 43 61 6c 6c 55 6e | 69 76 65 72 73 61 6c 50 | CallUn|iversalP| |00002140| 72 6f 63 28 75 73 65 72 | 52 6f 75 74 69 6e 65 2c |roc(user|Routine,| |00002150| 20 75 70 70 53 74 72 54 | 6f 41 64 64 72 50 72 6f | uppStrT|oAddrPro| |00002160| 63 49 6e 66 6f 2c 20 73 | 65 6c 65 63 74 6f 72 2c |cInfo, s|elector,| |00002170| 20 68 6f 73 74 4e 61 6d | 65 2c 20 72 74 6e 53 74 | hostNam|e, rtnSt| |00002180| 72 75 63 74 2c 20 72 65 | 73 75 6c 74 50 72 6f 63 |ruct, re|sultProc| |00002190| 2c 20 75 73 65 72 44 61 | 74 61 29 0d 23 65 6c 73 |, userDa|ta).#els| |000021a0| 65 0d 74 79 70 65 64 65 | 66 20 53 74 72 54 6f 41 |e.typede|f StrToA| |000021b0| 64 64 72 50 72 6f 63 50 | 74 72 20 53 74 72 54 6f |ddrProcP|tr StrTo| |000021c0| 41 64 64 72 55 50 50 3b | 0d 0d 23 64 65 66 69 6e |AddrUPP;|..#defin| |000021d0| 65 20 4e 65 77 53 74 72 | 54 6f 41 64 64 72 50 72 |e NewStr|ToAddrPr| |000021e0| 6f 63 28 75 73 65 72 52 | 6f 75 74 69 6e 65 29 20 |oc(userR|outine) | |000021f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002200| 20 20 20 20 20 20 5c 0d | 20 20 20 20 20 20 20 20 | \.| | |00002210| 28 53 74 72 54 6f 41 64 | 64 72 55 50 50 29 28 75 |(StrToAd|drUPP)(u| |00002220| 73 65 72 52 6f 75 74 69 | 6e 65 29 0d 23 64 65 66 |serRouti|ne).#def| |00002230| 69 6e 65 20 43 61 6c 6c | 53 74 72 54 6f 41 64 64 |ine Call|StrToAdd| |00002240| 72 50 72 6f 63 28 75 73 | 65 72 52 6f 75 74 69 6e |rProc(us|erRoutin| |00002250| 65 2c 20 73 65 6c 65 63 | 74 6f 72 2c 20 68 6f 73 |e, selec|tor, hos| |00002260| 74 4e 61 6d 65 2c 20 72 | 74 6e 53 74 72 75 63 74 |tName, r|tnStruct| |00002270| 2c 20 72 65 73 75 6c 74 | 50 72 6f 63 2c 20 75 73 |, result|Proc, us| |00002280| 65 72 44 61 74 61 29 20 | 5c 0d 20 20 20 20 20 20 |erData) |\. | |00002290| 20 20 28 2a 75 73 65 72 | 52 6f 75 74 69 6e 65 29 | (*user|Routine)| |000022a0| 28 73 65 6c 65 63 74 6f | 72 2c 20 68 6f 73 74 4e |(selecto|r, hostN| |000022b0| 61 6d 65 2c 20 72 74 6e | 53 74 72 75 63 74 2c 20 |ame, rtn|Struct, | |000022c0| 72 65 73 75 6c 74 50 72 | 6f 63 2c 20 75 73 65 72 |resultPr|oc, user| |000022d0| 44 61 74 61 29 0d 23 65 | 6e 64 69 66 0d 0d 0d 0d |Data).#e|ndif....| |000022e0| 2f 2a 70 61 73 63 61 6c | 2a 2f 20 4f 53 45 72 72 |/*pascal|*/ OSErr| |000022f0| 20 53 74 72 54 6f 41 64 | 64 72 28 68 6f 73 74 4e | StrToAd|dr(hostN| |00002300| 61 6d 65 2c 20 72 74 6e | 53 74 72 75 63 74 2c 20 |ame, rtn|Struct, | |00002310| 72 65 73 75 6c 74 70 72 | 6f 63 2c 20 75 73 65 72 |resultpr|oc, user| |00002320| 44 61 74 61 50 74 72 29 | 20 2f 2f 4d 44 54 0d 63 |DataPtr)| //MDT.c| |00002330| 68 61 72 20 2a 68 6f 73 | 74 4e 61 6d 65 3b 0d 73 |har *hos|tName;.s| |00002340| 74 72 75 63 74 20 68 6f | 73 74 49 6e 66 6f 20 2a |truct ho|stInfo *| |00002350| 72 74 6e 53 74 72 75 63 | 74 3b 0d 6c 6f 6e 67 20 |rtnStruc|t;.long | |00002360| 72 65 73 75 6c 74 70 72 | 6f 63 3b 0d 63 68 61 72 |resultpr|oc;.char| |00002370| 20 2a 75 73 65 72 44 61 | 74 61 50 74 72 3b 0d 7b | *userDa|taPtr;.{| |00002380| 0d 20 20 20 20 69 66 20 | 28 64 6e 72 20 3d 3d 20 |. if |(dnr == | |00002390| 6e 69 6c 29 0d 20 20 20 | 20 20 20 20 20 2f 2a 20 |nil). | /* | |000023a0| 72 65 73 6f 6c 76 65 72 | 20 6e 6f 74 20 6c 6f 61 |resolver| not loa| |000023b0| 64 65 64 20 65 72 72 6f | 72 20 2a 2f 0d 20 20 20 |ded erro|r */. | |000023c0| 20 20 20 20 20 72 65 74 | 75 72 6e 28 6e 6f 74 4f | ret|urn(notO| |000023d0| 70 65 6e 45 72 72 29 3b | 0d 0d 20 20 20 20 72 65 |penErr);|.. re| |000023e0| 74 75 72 6e 28 43 61 6c | 6c 53 74 72 54 6f 41 64 |turn(Cal|lStrToAd| |000023f0| 64 72 50 72 6f 63 28 28 | 53 74 72 54 6f 41 64 64 |drProc((|StrToAdd| |00002400| 72 55 50 50 29 20 64 6e | 72 2c 20 53 54 52 54 4f |rUPP) dn|r, STRTO| |00002410| 41 44 44 52 2c 20 68 6f | 73 74 4e 61 6d 65 2c 20 |ADDR, ho|stName, | |00002420| 28 76 6f 69 64 2a 29 20 | 72 74 6e 53 74 72 75 63 |(void*) |rtnStruc| |00002430| 74 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t,. | | |00002440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 72 | | r| |00002450| 65 73 75 6c 74 70 72 6f | 63 2c 20 75 73 65 72 44 |esultpro|c, userD| |00002460| 61 74 61 50 74 72 29 29 | 3b 0d 7d 0d 0d 0d 74 79 |ataPtr))|;.}...ty| |00002470| 70 65 64 65 66 20 4f 53 | 45 72 72 20 28 2a 41 64 |pedef OS|Err (*Ad| |00002480| 64 72 54 6f 53 74 72 50 | 72 6f 63 50 74 72 29 28 |drToStrP|rocPtr)(| |00002490| 6c 6f 6e 67 20 73 65 6c | 65 63 74 6f 72 2c 20 6c |long sel|ector, l| |000024a0| 6f 6e 67 20 61 64 64 72 | 65 73 73 2c 20 63 68 61 |ong addr|ess, cha| |000024b0| 72 2a 20 68 6f 73 74 4e | 61 6d 65 29 3b 0d 0d 65 |r* hostN|ame);..e| |000024c0| 6e 75 6d 20 7b 0d 20 20 | 20 20 75 70 70 41 64 64 |num {. | uppAdd| |000024d0| 72 54 6f 53 74 72 50 72 | 6f 63 49 6e 66 6f 20 3d |rToStrPr|ocInfo =| |000024e0| 20 6b 43 53 74 61 63 6b | 42 61 73 65 64 0d 20 20 | kCStack|Based. | |000024f0| 20 20 20 20 20 20 20 7c | 20 52 45 53 55 4c 54 5f | || RESULT_| |00002500| 53 49 5a 45 28 53 49 5a | 45 5f 43 4f 44 45 28 73 |SIZE(SIZ|E_CODE(s| |00002510| 69 7a 65 6f 66 28 6c 6f | 6e 67 29 29 29 0d 20 20 |izeof(lo|ng))). | |00002520| 20 20 20 20 20 20 20 7c | 20 53 54 41 43 4b 5f 52 | || STACK_R| |00002530| 4f 55 54 49 4e 45 5f 50 | 41 52 41 4d 45 54 45 52 |OUTINE_P|ARAMETER| |00002540| 28 31 2c 20 53 49 5a 45 | 5f 43 4f 44 45 28 73 69 |(1, SIZE|_CODE(si| |00002550| 7a 65 6f 66 28 73 68 6f | 72 74 29 29 29 0d 20 20 |zeof(sho|rt))). | |00002560| 20 20 20 20 20 20 20 7c | 20 53 54 41 43 4b 5f 52 | || STACK_R| |00002570| 4f 55 54 49 4e 45 5f 50 | 41 52 41 4d 45 54 45 52 |OUTINE_P|ARAMETER| |00002580| 28 32 2c 20 53 49 5a 45 | 5f 43 4f 44 45 28 73 69 |(2, SIZE|_CODE(si| |00002590| 7a 65 6f 66 28 75 6e 73 | 69 67 6e 65 64 20 6c 6f |zeof(uns|igned lo| |000025a0| 6e 67 29 29 29 0d 20 20 | 20 20 20 20 20 20 20 7c |ng))). | || |000025b0| 20 53 54 41 43 4b 5f 52 | 4f 55 54 49 4e 45 5f 50 | STACK_R|OUTINE_P| |000025c0| 41 52 41 4d 45 54 45 52 | 28 33 2c 20 53 49 5a 45 |ARAMETER|(3, SIZE| |000025d0| 5f 43 4f 44 45 28 73 69 | 7a 65 6f 66 28 63 68 61 |_CODE(si|zeof(cha| |000025e0| 72 20 2a 29 29 29 0d 7d | 3b 0d 0d 23 69 66 20 55 |r *))).}|;..#if U| |000025f0| 53 45 53 52 4f 55 54 49 | 4e 45 44 45 53 43 52 49 |SESROUTI|NEDESCRI| |00002600| 50 54 4f 52 53 0d 74 79 | 70 65 64 65 66 20 55 6e |PTORS.ty|pedef Un| |00002610| 69 76 65 72 73 61 6c 50 | 72 6f 63 50 74 72 20 41 |iversalP|rocPtr A| |00002620| 64 64 72 54 6f 53 74 72 | 55 50 50 3b 0d 0d 23 64 |ddrToStr|UPP;..#d| |00002630| 65 66 69 6e 65 20 4e 65 | 77 41 64 64 72 54 6f 53 |efine Ne|wAddrToS| |00002640| 74 72 50 72 6f 63 28 75 | 73 65 72 52 6f 75 74 69 |trProc(u|serRouti| |00002650| 6e 65 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ne) | | |00002660| 20 20 20 20 20 20 20 20 | 20 20 5c 0d 20 20 20 20 | | \. | |00002670| 20 20 20 20 28 41 64 64 | 72 54 6f 53 74 72 55 50 | (Add|rToStrUP| |00002680| 50 29 20 4e 65 77 52 6f | 75 74 69 6e 65 44 65 73 |P) NewRo|utineDes| |00002690| 63 72 69 70 74 6f 72 28 | 75 73 65 72 52 6f 75 74 |criptor(|userRout| |000026a0| 69 6e 65 2c 20 75 70 70 | 41 64 64 72 54 6f 53 74 |ine, upp|AddrToSt| |000026b0| 72 50 72 6f 63 49 6e 66 | 6f 2c 20 47 65 74 43 75 |rProcInf|o, GetCu| |000026c0| 72 72 65 6e 74 49 53 41 | 28 29 29 0d 23 64 65 66 |rrentISA|()).#def| |000026d0| 69 6e 65 20 43 61 6c 6c | 41 64 64 72 54 6f 53 74 |ine Call|AddrToSt| |000026e0| 72 50 72 6f 63 28 75 73 | 65 72 52 6f 75 74 69 6e |rProc(us|erRoutin| |000026f0| 65 2c 20 73 65 6c 65 63 | 74 6f 72 2c 20 61 64 64 |e, selec|tor, add| |00002700| 72 65 73 73 2c 20 68 6f | 73 74 4e 61 6d 65 29 20 |ress, ho|stName) | |00002710| 5c 0d 20 20 20 20 20 20 | 20 20 43 61 6c 6c 55 6e |\. | CallUn| |00002720| 69 76 65 72 73 61 6c 50 | 72 6f 63 28 75 73 65 72 |iversalP|roc(user| |00002730| 52 6f 75 74 69 6e 65 2c | 20 75 70 70 41 64 64 72 |Routine,| uppAddr| |00002740| 54 6f 53 74 72 50 72 6f | 63 49 6e 66 6f 2c 20 73 |ToStrPro|cInfo, s| |00002750| 65 6c 65 63 74 6f 72 2c | 20 61 64 64 72 65 73 73 |elector,| address| |00002760| 2c 20 68 6f 73 74 4e 61 | 6d 65 29 0d 23 65 6c 73 |, hostNa|me).#els| |00002770| 65 0d 74 79 70 65 64 65 | 66 20 41 64 64 72 54 6f |e.typede|f AddrTo| |00002780| 53 74 72 50 72 6f 63 50 | 74 72 20 41 64 64 72 54 |StrProcP|tr AddrT| |00002790| 6f 53 74 72 55 50 50 3b | 0d 0d 23 64 65 66 69 6e |oStrUPP;|..#defin| |000027a0| 65 20 4e 65 77 41 64 64 | 72 54 6f 53 74 72 50 72 |e NewAdd|rToStrPr| |000027b0| 6f 63 28 75 73 65 72 52 | 6f 75 74 69 6e 65 29 20 |oc(userR|outine) | |000027c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000027d0| 20 20 20 20 20 20 5c 0d | 20 20 20 20 20 20 20 20 | \.| | |000027e0| 28 41 64 64 72 54 6f 53 | 74 72 55 50 50 29 28 75 |(AddrToS|trUPP)(u| |000027f0| 73 65 72 52 6f 75 74 69 | 6e 65 29 0d 23 64 65 66 |serRouti|ne).#def| |00002800| 69 6e 65 20 43 61 6c 6c | 41 64 64 72 54 6f 53 74 |ine Call|AddrToSt| |00002810| 72 50 72 6f 63 28 75 73 | 65 72 52 6f 75 74 69 6e |rProc(us|erRoutin| |00002820| 65 2c 20 73 65 6c 65 63 | 74 6f 72 2c 20 61 64 64 |e, selec|tor, add| |00002830| 72 65 73 73 2c 20 68 6f | 73 74 4e 61 6d 65 29 20 |ress, ho|stName) | |00002840| 5c 0d 20 20 20 20 20 20 | 20 20 28 2a 75 73 65 72 |\. | (*user| |00002850| 52 6f 75 74 69 6e 65 29 | 28 73 65 6c 65 63 74 6f |Routine)|(selecto| |00002860| 72 2c 20 61 64 64 72 65 | 73 73 2c 20 68 6f 73 74 |r, addre|ss, host| |00002870| 4e 61 6d 65 29 0d 23 65 | 6e 64 69 66 0d 0d 0d 70 |Name).#e|ndif...p| |00002880| 61 73 63 61 6c 20 4f 53 | 45 72 72 20 41 64 64 72 |ascal OS|Err Addr| |00002890| 54 6f 53 74 72 28 61 64 | 64 72 2c 20 61 64 64 72 |ToStr(ad|dr, addr| |000028a0| 53 74 72 29 0d 75 6e 73 | 69 67 6e 65 64 20 6c 6f |Str).uns|igned lo| |000028b0| 6e 67 20 61 64 64 72 3b | 0d 63 68 61 72 20 2a 61 |ng addr;|.char *a| |000028c0| 64 64 72 53 74 72 3b 0d | 7b 0d 20 20 20 20 69 66 |ddrStr;.|{. if| |000028d0| 20 28 64 6e 72 20 3d 3d | 20 6e 69 6c 29 0d 20 20 | (dnr ==| nil). | |000028e0| 20 20 20 20 20 20 2f 2a | 20 72 65 73 6f 6c 76 65 | /*| resolve| |000028f0| 72 20 6e 6f 74 20 6c 6f | 61 64 65 64 20 65 72 72 |r not lo|aded err| |00002900| 6f 72 20 2a 2f 0d 20 20 | 20 20 20 20 20 20 72 65 |or */. | re| |00002910| 74 75 72 6e 28 6e 6f 74 | 4f 70 65 6e 45 72 72 29 |turn(not|OpenErr)| |00002920| 3b 0d 0d 20 20 20 20 43 | 61 6c 6c 41 64 64 72 54 |;.. C|allAddrT| |00002930| 6f 53 74 72 50 72 6f 63 | 28 28 41 64 64 72 54 6f |oStrProc|((AddrTo| |00002940| 53 74 72 55 50 50 29 20 | 64 6e 72 2c 20 41 44 44 |StrUPP) |dnr, ADD| |00002950| 52 54 4f 53 54 52 2c 20 | 61 64 64 72 2c 20 61 64 |RTOSTR, |addr, ad| |00002960| 64 72 53 74 72 29 3b 0d | 0d 20 20 20 20 72 65 74 |drStr);.|. ret| |00002970| 75 72 6e 28 6e 6f 45 72 | 72 29 3b 0d 7d 0d 0d 0d |urn(noEr|r);.}...| |00002980| 0d 74 79 70 65 64 65 66 | 20 4f 53 45 72 72 20 28 |.typedef| OSErr (| |00002990| 2a 45 6e 75 6d 43 61 63 | 68 65 50 72 6f 63 50 74 |*EnumCac|heProcPt| |000029a0| 72 29 28 6c 6f 6e 67 20 | 73 65 6c 65 63 74 6f 72 |r)(long |selector| |000029b0| 2c 20 6c 6f 6e 67 20 72 | 65 73 75 6c 74 2c 20 63 |, long r|esult, c| |000029c0| 68 61 72 2a 20 75 73 65 | 72 44 61 74 61 29 3b 0d |har* use|rData);.| |000029d0| 0d 65 6e 75 6d 20 7b 0d | 20 20 20 20 75 70 70 45 |.enum {.| uppE| |000029e0| 6e 75 6d 43 61 63 68 65 | 50 72 6f 63 49 6e 66 6f |numCache|ProcInfo| |000029f0| 20 3d 20 6b 43 53 74 61 | 63 6b 42 61 73 65 64 0d | = kCSta|ckBased.| |00002a00| 20 20 20 20 20 20 20 20 | 20 7c 20 52 45 53 55 4c | | | RESUL| |00002a10| 54 5f 53 49 5a 45 28 53 | 49 5a 45 5f 43 4f 44 45 |T_SIZE(S|IZE_CODE| |00002a20| 28 73 69 7a 65 6f 66 28 | 6c 6f 6e 67 29 29 29 0d |(sizeof(|long))).| |00002a30| 20 20 20 20 20 20 20 20 | 20 7c 20 53 54 41 43 4b | | | STACK| |00002a40| 5f 52 4f 55 54 49 4e 45 | 5f 50 41 52 41 4d 45 54 |_ROUTINE|_PARAMET| |00002a50| 45 52 28 31 2c 20 53 49 | 5a 45 5f 43 4f 44 45 28 |ER(1, SI|ZE_CODE(| |00002a60| 73 69 7a 65 6f 66 28 73 | 68 6f 72 74 29 29 29 0d |sizeof(s|hort))).| |00002a70| 20 20 20 20 20 20 20 20 | 20 7c 20 53 54 41 43 4b | | | STACK| |00002a80| 5f 52 4f 55 54 49 4e 45 | 5f 50 41 52 41 4d 45 54 |_ROUTINE|_PARAMET| |00002a90| 45 52 28 32 2c 20 53 49 | 5a 45 5f 43 4f 44 45 28 |ER(2, SI|ZE_CODE(| |00002aa0| 73 69 7a 65 6f 66 28 6c | 6f 6e 67 29 29 29 0d 20 |sizeof(l|ong))). | |00002ab0| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |00002ac0| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |00002ad0| 52 28 33 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(3, SIZ|E_CODE(s| |00002ae0| 69 7a 65 6f 66 28 63 68 | 61 72 20 2a 29 29 29 0d |izeof(ch|ar *))).| |00002af0| 7d 3b 0d 0d 23 69 66 20 | 55 53 45 53 52 4f 55 54 |};..#if |USESROUT| |00002b00| 49 4e 45 44 45 53 43 52 | 49 50 54 4f 52 53 0d 74 |INEDESCR|IPTORS.t| |00002b10| 79 70 65 64 65 66 20 55 | 6e 69 76 65 72 73 61 6c |ypedef U|niversal| |00002b20| 50 72 6f 63 50 74 72 20 | 45 6e 75 6d 43 61 63 68 |ProcPtr |EnumCach| |00002b30| 65 55 50 50 3b 0d 0d 23 | 64 65 66 69 6e 65 20 4e |eUPP;..#|define N| |00002b40| 65 77 45 6e 75 6d 43 61 | 63 68 65 50 72 6f 63 28 |ewEnumCa|cheProc(| |00002b50| 75 73 65 72 52 6f 75 74 | 69 6e 65 29 20 20 20 20 |userRout|ine) | |00002b60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002b70| 20 20 20 5c 0d 20 20 20 | 20 20 20 20 20 28 45 6e | \. | (En| |00002b80| 75 6d 43 61 63 68 65 55 | 50 50 29 20 4e 65 77 52 |umCacheU|PP) NewR| |00002b90| 6f 75 74 69 6e 65 44 65 | 73 63 72 69 70 74 6f 72 |outineDe|scriptor| |00002ba0| 28 75 73 65 72 52 6f 75 | 74 69 6e 65 2c 20 75 70 |(userRou|tine, up| |00002bb0| 70 45 6e 75 6d 43 61 63 | 68 65 50 72 6f 63 49 6e |pEnumCac|heProcIn| |00002bc0| 66 6f 2c 20 47 65 74 43 | 75 72 72 65 6e 74 49 53 |fo, GetC|urrentIS| |00002bd0| 41 28 29 29 0d 23 64 65 | 66 69 6e 65 20 43 61 6c |A()).#de|fine Cal| |00002be0| 6c 45 6e 75 6d 43 61 63 | 68 65 50 72 6f 63 28 75 |lEnumCac|heProc(u| |00002bf0| 73 65 72 52 6f 75 74 69 | 6e 65 2c 20 73 65 6c 65 |serRouti|ne, sele| |00002c00| 63 74 6f 72 2c 20 72 65 | 73 75 6c 74 2c 20 75 73 |ctor, re|sult, us| |00002c10| 65 72 44 61 74 61 29 20 | 20 5c 0d 20 20 20 20 20 |erData) | \. | |00002c20| 20 20 20 43 61 6c 6c 55 | 6e 69 76 65 72 73 61 6c | CallU|niversal| |00002c30| 50 72 6f 63 28 75 73 65 | 72 52 6f 75 74 69 6e 65 |Proc(use|rRoutine| |00002c40| 2c 20 75 70 70 45 6e 75 | 6d 43 61 63 68 65 50 72 |, uppEnu|mCachePr| |00002c50| 6f 63 49 6e 66 6f 2c 20 | 73 65 6c 65 63 74 6f 72 |ocInfo, |selector| |00002c60| 2c 20 72 65 73 75 6c 74 | 2c 20 75 73 65 72 44 61 |, result|, userDa| |00002c70| 74 61 29 0d 23 65 6c 73 | 65 0d 74 79 70 65 64 65 |ta).#els|e.typede| |00002c80| 66 20 45 6e 75 6d 43 61 | 63 68 65 50 72 6f 63 50 |f EnumCa|cheProcP| |00002c90| 74 72 20 45 6e 75 6d 43 | 61 63 68 65 55 50 50 3b |tr EnumC|acheUPP;| |00002ca0| 0d 0d 23 64 65 66 69 6e | 65 20 4e 65 77 45 6e 75 |..#defin|e NewEnu| |00002cb0| 6d 43 61 63 68 65 50 72 | 6f 63 28 75 73 65 72 52 |mCachePr|oc(userR| |00002cc0| 6f 75 74 69 6e 65 29 20 | 20 20 20 20 20 20 20 20 |outine) | | |00002cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 5c 0d | | \.| |00002ce0| 20 20 20 20 20 20 20 20 | 28 45 6e 75 6d 43 61 63 | |(EnumCac| |00002cf0| 68 65 55 50 50 29 28 75 | 73 65 72 52 6f 75 74 69 |heUPP)(u|serRouti| |00002d00| 6e 65 29 0d 23 64 65 66 | 69 6e 65 20 43 61 6c 6c |ne).#def|ine Call| |00002d10| 45 6e 75 6d 43 61 63 68 | 65 50 72 6f 63 28 75 73 |EnumCach|eProc(us| |00002d20| 65 72 52 6f 75 74 69 6e | 65 2c 20 73 65 6c 65 63 |erRoutin|e, selec| |00002d30| 74 6f 72 2c 20 72 65 73 | 75 6c 74 2c 20 75 73 65 |tor, res|ult, use| |00002d40| 72 44 61 74 61 29 20 20 | 5c 0d 20 20 20 20 20 20 |rData) |\. | |00002d50| 20 20 28 2a 75 73 65 72 | 52 6f 75 74 69 6e 65 29 | (*user|Routine)| |00002d60| 28 73 65 6c 65 63 74 6f | 72 2c 20 72 65 73 75 6c |(selecto|r, resul| |00002d70| 74 2c 20 75 73 65 72 44 | 61 74 61 29 0d 23 65 6e |t, userD|ata).#en| |00002d80| 64 69 66 0d 0d 0d 0d 70 | 61 73 63 61 6c 20 4f 53 |dif....p|ascal OS| |00002d90| 45 72 72 20 45 6e 75 6d | 43 61 63 68 65 28 72 65 |Err Enum|Cache(re| |00002da0| 73 75 6c 74 70 72 6f 63 | 2c 20 75 73 65 72 44 61 |sultproc|, userDa| |00002db0| 74 61 50 74 72 29 0d 6c | 6f 6e 67 20 72 65 73 75 |taPtr).l|ong resu| |00002dc0| 6c 74 70 72 6f 63 3b 0d | 63 68 61 72 20 2a 75 73 |ltproc;.|char *us| |00002dd0| 65 72 44 61 74 61 50 74 | 72 3b 0d 7b 0d 20 20 20 |erDataPt|r;.{. | |00002de0| 20 69 66 20 28 64 6e 72 | 20 3d 3d 20 6e 69 6c 29 | if (dnr| == nil)| |00002df0| 0d 20 20 20 20 20 20 20 | 20 2f 2a 20 72 65 73 6f |. | /* reso| |00002e00| 6c 76 65 72 20 6e 6f 74 | 20 6c 6f 61 64 65 64 20 |lver not| loaded | |00002e10| 65 72 72 6f 72 20 2a 2f | 0d 20 20 20 20 20 20 20 |error */|. | |00002e20| 20 72 65 74 75 72 6e 28 | 6e 6f 74 4f 70 65 6e 45 | return(|notOpenE| |00002e30| 72 72 29 3b 0d 0d 20 20 | 20 20 72 65 74 75 72 6e |rr);.. | return| |00002e40| 28 43 61 6c 6c 45 6e 75 | 6d 43 61 63 68 65 50 72 |(CallEnu|mCachePr| |00002e50| 6f 63 28 28 45 6e 75 6d | 43 61 63 68 65 55 50 50 |oc((Enum|CacheUPP| |00002e60| 29 20 64 6e 72 2c 20 45 | 4e 55 4d 43 41 43 48 45 |) dnr, E|NUMCACHE| |00002e70| 2c 20 72 65 73 75 6c 74 | 70 72 6f 63 2c 20 75 73 |, result|proc, us| |00002e80| 65 72 44 61 74 61 50 74 | 72 29 29 3b 0d 7d 0d 0d |erDataPt|r));.}..| |00002e90| 0d 0d 74 79 70 65 64 65 | 66 20 4f 53 45 72 72 20 |..typede|f OSErr | |00002ea0| 28 2a 41 64 64 72 54 6f | 4e 61 6d 65 50 72 6f 63 |(*AddrTo|NameProc| |00002eb0| 50 74 72 29 28 6c 6f 6e | 67 20 73 65 6c 65 63 74 |Ptr)(lon|g select| |00002ec0| 6f 72 2c 20 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |or, unsi|gned lon| |00002ed0| 67 20 61 64 64 72 2c 20 | 73 74 72 75 63 74 20 68 |g addr, |struct h| |00002ee0| 6f 73 74 49 6e 66 6f 2a | 20 72 74 6e 53 74 72 75 |ostInfo*| rtnStru| |00002ef0| 63 74 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ct,. | | |00002f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00002f10| 20 20 20 20 20 20 20 20 | 6c 6f 6e 67 20 72 65 73 | |long res| |00002f20| 75 6c 74 50 72 6f 63 2c | 20 63 68 61 72 2a 20 75 |ultProc,| char* u| |00002f30| 73 65 72 44 61 74 61 29 | 3b 0d 0d 65 6e 75 6d 20 |serData)|;..enum | |00002f40| 7b 0d 20 20 20 20 75 70 | 70 41 64 64 72 54 6f 4e |{. up|pAddrToN| |00002f50| 61 6d 65 50 72 6f 63 49 | 6e 66 6f 20 3d 20 6b 43 |ameProcI|nfo = kC| |00002f60| 53 74 61 63 6b 42 61 73 | 65 64 0d 20 20 20 20 20 |StackBas|ed. | |00002f70| 20 20 20 20 7c 20 52 45 | 53 55 4c 54 5f 53 49 5a | | RE|SULT_SIZ| |00002f80| 45 28 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |E(SIZE_C|ODE(size| |00002f90| 6f 66 28 6c 6f 6e 67 29 | 29 29 0d 20 20 20 20 20 |of(long)|)). | |00002fa0| 20 20 20 20 7c 20 53 54 | 41 43 4b 5f 52 4f 55 54 | | ST|ACK_ROUT| |00002fb0| 49 4e 45 5f 50 41 52 41 | 4d 45 54 45 52 28 31 2c |INE_PARA|METER(1,| |00002fc0| 20 53 49 5a 45 5f 43 4f | 44 45 28 73 69 7a 65 6f | SIZE_CO|DE(sizeo| |00002fd0| 66 28 73 68 6f 72 74 29 | 29 29 0d 20 20 20 20 20 |f(short)|)). | |00002fe0| 20 20 20 20 7c 20 53 54 | 41 43 4b 5f 52 4f 55 54 | | ST|ACK_ROUT| |00002ff0| 49 4e 45 5f 50 41 52 41 | 4d 45 54 45 52 28 32 2c |INE_PARA|METER(2,| |00003000| 20 53 49 5a 45 5f 43 4f | 44 45 28 73 69 7a 65 6f | SIZE_CO|DE(sizeo| |00003010| 66 28 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 29 |f(unsign|ed long)| |00003020| 29 29 0d 20 20 20 20 20 | 20 20 20 20 7c 20 53 54 |)). | | ST| |00003030| 41 43 4b 5f 52 4f 55 54 | 49 4e 45 5f 50 41 52 41 |ACK_ROUT|INE_PARA| |00003040| 4d 45 54 45 52 28 33 2c | 20 53 49 5a 45 5f 43 4f |METER(3,| SIZE_CO| |00003050| 44 45 28 73 69 7a 65 6f | 66 28 73 74 72 75 63 74 |DE(sizeo|f(struct| |00003060| 20 68 6f 73 74 49 6e 66 | 6f 20 2a 29 29 29 0d 20 | hostInf|o *))). | |00003070| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |00003080| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |00003090| 52 28 34 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(4, SIZ|E_CODE(s| |000030a0| 69 7a 65 6f 66 28 6c 6f | 6e 67 29 29 29 0d 20 20 |izeof(lo|ng))). | |000030b0| 20 20 20 20 20 20 20 7c | 20 53 54 41 43 4b 5f 52 | || STACK_R| |000030c0| 4f 55 54 49 4e 45 5f 50 | 41 52 41 4d 45 54 45 52 |OUTINE_P|ARAMETER| |000030d0| 28 35 2c 20 53 49 5a 45 | 5f 43 4f 44 45 28 73 69 |(5, SIZE|_CODE(si| |000030e0| 7a 65 6f 66 28 63 68 61 | 72 20 2a 29 29 29 0d 0d |zeof(cha|r *)))..| |000030f0| 7d 3b 0d 0d 23 69 66 20 | 55 53 45 53 52 4f 55 54 |};..#if |USESROUT| |00003100| 49 4e 45 44 45 53 43 52 | 49 50 54 4f 52 53 0d 74 |INEDESCR|IPTORS.t| |00003110| 79 70 65 64 65 66 20 55 | 6e 69 76 65 72 73 61 6c |ypedef U|niversal| |00003120| 50 72 6f 63 50 74 72 20 | 41 64 64 72 54 6f 4e 61 |ProcPtr |AddrToNa| |00003130| 6d 65 55 50 50 3b 0d 0d | 23 64 65 66 69 6e 65 20 |meUPP;..|#define | |00003140| 4e 65 77 41 64 64 72 54 | 6f 4e 61 6d 65 50 72 6f |NewAddrT|oNamePro| |00003150| 63 28 75 73 65 72 52 6f | 75 74 69 6e 65 29 20 20 |c(userRo|utine) | |00003160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003170| 20 20 20 20 5c 0d 20 20 | 20 20 20 20 20 20 28 41 | \. | (A| |00003180| 64 64 72 54 6f 4e 61 6d | 65 55 50 50 29 20 4e 65 |ddrToNam|eUPP) Ne| |00003190| 77 52 6f 75 74 69 6e 65 | 44 65 73 63 72 69 70 74 |wRoutine|Descript| |000031a0| 6f 72 28 75 73 65 72 52 | 6f 75 74 69 6e 65 2c 20 |or(userR|outine, | |000031b0| 75 70 70 41 64 64 72 54 | 6f 4e 61 6d 65 50 72 6f |uppAddrT|oNamePro| |000031c0| 63 49 6e 66 6f 2c 20 47 | 65 74 43 75 72 72 65 6e |cInfo, G|etCurren| |000031d0| 74 49 53 41 28 29 29 0d | 23 64 65 66 69 6e 65 20 |tISA()).|#define | |000031e0| 43 61 6c 6c 41 64 64 72 | 54 6f 4e 61 6d 65 50 72 |CallAddr|ToNamePr| |000031f0| 6f 63 28 75 73 65 72 52 | 6f 75 74 69 6e 65 2c 20 |oc(userR|outine, | |00003200| 73 65 6c 65 63 74 6f 72 | 2c 20 61 64 64 72 2c 20 |selector|, addr, | |00003210| 72 74 6e 53 74 72 75 63 | 74 2c 20 72 65 73 75 6c |rtnStruc|t, resul| |00003220| 74 50 72 6f 63 2c 20 75 | 73 65 72 44 61 74 61 29 |tProc, u|serData)| |00003230| 20 20 20 20 5c 0d 20 20 | 20 20 20 20 20 20 43 61 | \. | Ca| |00003240| 6c 6c 55 6e 69 76 65 72 | 73 61 6c 50 72 6f 63 28 |llUniver|salProc(| |00003250| 75 73 65 72 52 6f 75 74 | 69 6e 65 2c 20 75 70 70 |userRout|ine, upp| |00003260| 41 64 64 72 54 6f 4e 61 | 6d 65 50 72 6f 63 49 6e |AddrToNa|meProcIn| |00003270| 66 6f 2c 20 73 65 6c 65 | 63 74 6f 72 2c 20 61 64 |fo, sele|ctor, ad| |00003280| 64 72 2c 20 72 74 6e 53 | 74 72 75 63 74 2c 20 72 |dr, rtnS|truct, r| |00003290| 65 73 75 6c 74 50 72 6f | 63 2c 20 75 73 65 72 44 |esultPro|c, userD| |000032a0| 61 74 61 29 0d 23 65 6c | 73 65 0d 74 79 70 65 64 |ata).#el|se.typed| |000032b0| 65 66 20 41 64 64 72 54 | 6f 4e 61 6d 65 50 72 6f |ef AddrT|oNamePro| |000032c0| 63 50 74 72 20 41 64 64 | 72 54 6f 4e 61 6d 65 55 |cPtr Add|rToNameU| |000032d0| 50 50 3b 0d 0d 23 64 65 | 66 69 6e 65 20 4e 65 77 |PP;..#de|fine New| |000032e0| 41 64 64 72 54 6f 4e 61 | 6d 65 50 72 6f 63 28 75 |AddrToNa|meProc(u| |000032f0| 73 65 72 52 6f 75 74 69 | 6e 65 29 20 20 20 20 20 |serRouti|ne) | |00003300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003310| 20 5c 0d 20 20 20 20 20 | 20 20 20 28 41 64 64 72 | \. | (Addr| |00003320| 54 6f 4e 61 6d 65 55 50 | 50 29 28 75 73 65 72 52 |ToNameUP|P)(userR| |00003330| 6f 75 74 69 6e 65 29 0d | 23 64 65 66 69 6e 65 20 |outine).|#define | |00003340| 43 61 6c 6c 41 64 64 72 | 54 6f 4e 61 6d 65 50 72 |CallAddr|ToNamePr| |00003350| 6f 63 28 75 73 65 72 52 | 6f 75 74 69 6e 65 2c 20 |oc(userR|outine, | |00003360| 73 65 6c 65 63 74 6f 72 | 2c 20 61 64 64 72 2c 20 |selector|, addr, | |00003370| 72 74 6e 53 74 72 75 63 | 74 2c 20 72 65 73 75 6c |rtnStruc|t, resul| |00003380| 74 50 72 6f 63 2c 20 75 | 73 65 72 44 61 74 61 29 |tProc, u|serData)| |00003390| 20 20 20 20 5c 0d 20 20 | 20 20 20 20 20 20 28 2a | \. | (*| |000033a0| 75 73 65 72 52 6f 75 74 | 69 6e 65 29 28 73 65 6c |userRout|ine)(sel| |000033b0| 65 63 74 6f 72 2c 20 61 | 64 64 72 2c 20 72 74 6e |ector, a|ddr, rtn| |000033c0| 53 74 72 75 63 74 2c 20 | 72 65 73 75 6c 74 50 72 |Struct, |resultPr| |000033d0| 6f 63 2c 20 75 73 65 72 | 44 61 74 61 29 0d 23 65 |oc, user|Data).#e| |000033e0| 6e 64 69 66 0d 0d 0d 0d | 2f 2a 70 61 73 63 61 6c |ndif....|/*pascal| |000033f0| 2a 2f 20 4f 53 45 72 72 | 20 41 64 64 72 54 6f 4e |*/ OSErr| AddrToN| |00003400| 61 6d 65 28 61 64 64 72 | 2c 20 72 74 6e 53 74 72 |ame(addr|, rtnStr| |00003410| 75 63 74 2c 20 72 65 73 | 75 6c 74 70 72 6f 63 2c |uct, res|ultproc,| |00003420| 20 75 73 65 72 44 61 74 | 61 50 74 72 29 20 20 2f | userDat|aPtr) /| |00003430| 2f 4d 44 54 0d 75 6e 73 | 69 67 6e 65 64 20 6c 6f |/MDT.uns|igned lo| |00003440| 6e 67 20 61 64 64 72 3b | 0d 73 74 72 75 63 74 20 |ng addr;|.struct | |00003450| 68 6f 73 74 49 6e 66 6f | 20 2a 72 74 6e 53 74 72 |hostInfo| *rtnStr| |00003460| 75 63 74 3b 0d 6c 6f 6e | 67 20 72 65 73 75 6c 74 |uct;.lon|g result| |00003470| 70 72 6f 63 3b 0d 63 68 | 61 72 20 2a 75 73 65 72 |proc;.ch|ar *user| |00003480| 44 61 74 61 50 74 72 3b | 0d 7b 0d 20 20 20 20 69 |DataPtr;|.{. i| |00003490| 66 20 28 64 6e 72 20 3d | 3d 20 6e 69 6c 29 0d 20 |f (dnr =|= nil). | |000034a0| 20 20 20 20 20 20 20 2f | 2a 20 72 65 73 6f 6c 76 | /|* resolv| |000034b0| 65 72 20 6e 6f 74 20 6c | 6f 61 64 65 64 20 65 72 |er not l|oaded er| |000034c0| 72 6f 72 20 2a 2f 0d 20 | 20 20 20 20 20 20 20 72 |ror */. | r| |000034d0| 65 74 75 72 6e 28 6e 6f | 74 4f 70 65 6e 45 72 72 |eturn(no|tOpenErr| |000034e0| 29 3b 0d 0d 20 20 20 20 | 72 65 74 75 72 6e 28 43 |);.. |return(C| |000034f0| 61 6c 6c 41 64 64 72 54 | 6f 4e 61 6d 65 50 72 6f |allAddrT|oNamePro| |00003500| 63 28 28 41 64 64 72 54 | 6f 4e 61 6d 65 55 50 50 |c((AddrT|oNameUPP| |00003510| 29 20 64 6e 72 2c 20 41 | 44 44 52 54 4f 4e 41 4d |) dnr, A|DDRTONAM| |00003520| 45 2c 20 61 64 64 72 2c | 20 72 74 6e 53 74 72 75 |E, addr,| rtnStru| |00003530| 63 74 2c 20 72 65 73 75 | 6c 74 70 72 6f 63 2c 20 |ct, resu|ltproc, | |00003540| 75 73 65 72 44 61 74 61 | 50 74 72 29 29 3b 0d 7d |userData|Ptr));.}| |00003550| 0d 0d 0d 74 79 70 65 64 | 65 66 20 4f 53 45 72 72 |...typed|ef OSErr| |00003560| 20 28 2a 48 49 6e 66 6f | 50 72 6f 63 50 74 72 29 | (*HInfo|ProcPtr)| |00003570| 28 6c 6f 6e 67 20 73 65 | 6c 65 63 74 6f 72 2c 20 |(long se|lector, | |00003580| 63 68 61 72 2a 20 68 6f | 73 74 4e 61 6d 65 2c 20 |char* ho|stName, | |00003590| 73 74 72 75 63 74 20 72 | 65 74 75 72 6e 52 65 63 |struct r|eturnRec| |000035a0| 2a 20 72 65 74 75 72 6e | 52 65 63 50 74 72 2c 0d |* return|RecPtr,.| |000035b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000035c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |000035d0| 6c 6f 6e 67 20 72 65 73 | 75 6c 74 50 72 6f 63 2c |long res|ultProc,| |000035e0| 20 63 68 61 72 2a 20 75 | 73 65 72 44 61 74 61 29 | char* u|serData)| |000035f0| 3b 0d 0d 65 6e 75 6d 20 | 7b 0d 20 20 20 20 75 70 |;..enum |{. up| |00003600| 70 48 49 6e 66 6f 50 72 | 6f 63 49 6e 66 6f 20 3d |pHInfoPr|ocInfo =| |00003610| 20 6b 43 53 74 61 63 6b | 42 61 73 65 64 0d 20 20 | kCStack|Based. | |00003620| 20 20 20 20 20 20 20 7c | 20 52 45 53 55 4c 54 5f | || RESULT_| |00003630| 53 49 5a 45 28 53 49 5a | 45 5f 43 4f 44 45 28 73 |SIZE(SIZ|E_CODE(s| |00003640| 69 7a 65 6f 66 28 6c 6f | 6e 67 29 29 29 0d 20 20 |izeof(lo|ng))). | |00003650| 20 20 20 20 20 20 20 7c | 20 53 54 41 43 4b 5f 52 | || STACK_R| |00003660| 4f 55 54 49 4e 45 5f 50 | 41 52 41 4d 45 54 45 52 |OUTINE_P|ARAMETER| |00003670| 28 31 2c 20 53 49 5a 45 | 5f 43 4f 44 45 28 73 69 |(1, SIZE|_CODE(si| |00003680| 7a 65 6f 66 28 73 68 6f | 72 74 29 29 29 0d 20 20 |zeof(sho|rt))). | |00003690| 20 20 20 20 20 20 20 7c | 20 53 54 41 43 4b 5f 52 | || STACK_R| |000036a0| 4f 55 54 49 4e 45 5f 50 | 41 52 41 4d 45 54 45 52 |OUTINE_P|ARAMETER| |000036b0| 28 32 2c 20 53 49 5a 45 | 5f 43 4f 44 45 28 73 69 |(2, SIZE|_CODE(si| |000036c0| 7a 65 6f 66 28 63 68 61 | 72 20 2a 29 29 29 0d 20 |zeof(cha|r *))). | |000036d0| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |000036e0| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |000036f0| 52 28 33 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(3, SIZ|E_CODE(s| |00003700| 69 7a 65 6f 66 28 73 74 | 72 75 63 74 20 72 65 74 |izeof(st|ruct ret| |00003710| 75 72 6e 52 65 63 20 2a | 29 29 29 0d 20 20 20 20 |urnRec *|))). | |00003720| 20 20 20 20 20 7c 20 53 | 54 41 43 4b 5f 52 4f 55 | | S|TACK_ROU| |00003730| 54 49 4e 45 5f 50 41 52 | 41 4d 45 54 45 52 28 34 |TINE_PAR|AMETER(4| |00003740| 2c 20 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |, SIZE_C|ODE(size| |00003750| 6f 66 28 6c 6f 6e 67 29 | 29 29 0d 20 20 20 20 20 |of(long)|)). | |00003760| 20 20 20 20 7c 20 53 54 | 41 43 4b 5f 52 4f 55 54 | | ST|ACK_ROUT| |00003770| 49 4e 45 5f 50 41 52 41 | 4d 45 54 45 52 28 35 2c |INE_PARA|METER(5,| |00003780| 20 53 49 5a 45 5f 43 4f | 44 45 28 73 69 7a 65 6f | SIZE_CO|DE(sizeo| |00003790| 66 28 63 68 61 72 20 2a | 29 29 29 0d 0d 7d 3b 0d |f(char *|)))..};.| |000037a0| 0d 23 69 66 20 55 53 45 | 53 52 4f 55 54 49 4e 45 |.#if USE|SROUTINE| |000037b0| 44 45 53 43 52 49 50 54 | 4f 52 53 0d 74 79 70 65 |DESCRIPT|ORS.type| |000037c0| 64 65 66 20 55 6e 69 76 | 65 72 73 61 6c 50 72 6f |def Univ|ersalPro| |000037d0| 63 50 74 72 20 48 49 6e | 66 6f 55 50 50 3b 0d 0d |cPtr HIn|foUPP;..| |000037e0| 23 64 65 66 69 6e 65 20 | 4e 65 77 48 49 6e 66 6f |#define |NewHInfo| |000037f0| 50 72 6f 63 28 75 73 65 | 72 52 6f 75 74 69 6e 65 |Proc(use|rRoutine| |00003800| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | | |00003810| 20 20 20 20 20 20 20 20 | 5c 0d 20 20 20 20 20 20 | |\. | |00003820| 20 20 28 48 49 6e 66 6f | 55 50 50 29 20 4e 65 77 | (HInfo|UPP) New| |00003830| 52 6f 75 74 69 6e 65 44 | 65 73 63 72 69 70 74 6f |RoutineD|escripto| |00003840| 72 28 75 73 65 72 52 6f | 75 74 69 6e 65 2c 20 75 |r(userRo|utine, u| |00003850| 70 70 48 49 6e 66 6f 50 | 72 6f 63 49 6e 66 6f 2c |ppHInfoP|rocInfo,| |00003860| 20 47 65 74 43 75 72 72 | 65 6e 74 49 53 41 28 29 | GetCurr|entISA()| |00003870| 29 0d 23 64 65 66 69 6e | 65 20 43 61 6c 6c 48 49 |).#defin|e CallHI| |00003880| 6e 66 6f 50 72 6f 63 28 | 75 73 65 72 52 6f 75 74 |nfoProc(|userRout| |00003890| 69 6e 65 2c 20 73 65 6c | 65 63 74 6f 72 2c 20 68 |ine, sel|ector, h| |000038a0| 6f 73 74 4e 61 6d 65 2c | 20 72 65 74 75 72 6e 52 |ostName,| returnR| |000038b0| 65 63 50 74 72 2c 20 72 | 65 73 75 6c 74 50 72 6f |ecPtr, r|esultPro| |000038c0| 63 2c 20 75 73 65 72 44 | 61 74 61 29 20 20 5c 0d |c, userD|ata) \.| |000038d0| 20 20 20 20 20 20 20 20 | 43 61 6c 6c 55 6e 69 76 | |CallUniv| |000038e0| 65 72 73 61 6c 50 72 6f | 63 28 75 73 65 72 52 6f |ersalPro|c(userRo| |000038f0| 75 74 69 6e 65 2c 20 75 | 70 70 48 49 6e 66 6f 50 |utine, u|ppHInfoP| |00003900| 72 6f 63 49 6e 66 6f 2c | 20 73 65 6c 65 63 74 6f |rocInfo,| selecto| |00003910| 72 2c 20 68 6f 73 74 4e | 61 6d 65 2c 20 72 65 74 |r, hostN|ame, ret| |00003920| 75 72 6e 52 65 63 50 74 | 72 2c 20 72 65 73 75 6c |urnRecPt|r, resul| |00003930| 74 50 72 6f 63 2c 20 75 | 73 65 72 44 61 74 61 29 |tProc, u|serData)| |00003940| 0d 23 65 6c 73 65 0d 74 | 79 70 65 64 65 66 20 48 |.#else.t|ypedef H| |00003950| 49 6e 66 6f 50 72 6f 63 | 50 74 72 20 48 49 6e 66 |InfoProc|Ptr HInf| |00003960| 6f 55 50 50 3b 0d 0d 23 | 64 65 66 69 6e 65 20 4e |oUPP;..#|define N| |00003970| 65 77 48 49 6e 66 6f 50 | 72 6f 63 28 75 73 65 72 |ewHInfoP|roc(user| |00003980| 52 6f 75 74 69 6e 65 29 | 20 20 20 20 20 20 20 20 |Routine)| | |00003990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 5c | | \| |000039a0| 0d 20 20 20 20 20 20 20 | 20 28 48 49 6e 66 6f 55 |. | (HInfoU| |000039b0| 50 50 29 28 75 73 65 72 | 52 6f 75 74 69 6e 65 29 |PP)(user|Routine)| |000039c0| 0d 23 64 65 66 69 6e 65 | 20 43 61 6c 6c 48 49 6e |.#define| CallHIn| |000039d0| 66 6f 50 72 6f 63 28 75 | 73 65 72 52 6f 75 74 69 |foProc(u|serRouti| |000039e0| 6e 65 2c 20 73 65 6c 65 | 63 74 6f 72 2c 20 68 6f |ne, sele|ctor, ho| |000039f0| 73 74 4e 61 6d 65 2c 20 | 72 65 74 75 72 6e 52 65 |stName, |returnRe| |00003a00| 63 50 74 72 2c 20 72 65 | 73 75 6c 74 50 72 6f 63 |cPtr, re|sultProc| |00003a10| 2c 20 75 73 65 72 44 61 | 74 61 29 20 20 5c 0d 20 |, userDa|ta) \. | |00003a20| 20 20 20 20 20 20 20 28 | 2a 75 73 65 72 52 6f 75 | (|*userRou| |00003a30| 74 69 6e 65 29 28 73 65 | 6c 65 63 74 6f 72 2c 20 |tine)(se|lector, | |00003a40| 68 6f 73 74 4e 61 6d 65 | 2c 20 72 65 74 75 72 6e |hostName|, return| |00003a50| 52 65 63 50 74 72 2c 20 | 72 65 73 75 6c 74 50 72 |RecPtr, |resultPr| |00003a60| 6f 63 2c 20 75 73 65 72 | 44 61 74 61 29 0d 23 65 |oc, user|Data).#e| |00003a70| 6e 64 69 66 0d 0d 70 61 | 73 63 61 6c 20 20 4f 53 |ndif..pa|scal OS| |00003a80| 45 72 72 20 48 49 6e 66 | 6f 28 68 6f 73 74 4e 61 |Err HInf|o(hostNa| |00003a90| 6d 65 2c 20 72 65 74 75 | 72 6e 52 65 63 50 74 72 |me, retu|rnRecPtr| |00003aa0| 2c 20 72 65 73 75 6c 74 | 50 72 6f 63 2c 20 75 73 |, result|Proc, us| |00003ab0| 65 72 44 61 74 61 50 74 | 72 29 0d 63 68 61 72 20 |erDataPt|r).char | |00003ac0| 2a 68 6f 73 74 4e 61 6d | 65 3b 0d 73 74 72 75 63 |*hostNam|e;.struc| |00003ad0| 74 20 72 65 74 75 72 6e | 52 65 63 20 2a 72 65 74 |t return|Rec *ret| |00003ae0| 75 72 6e 52 65 63 50 74 | 72 3b 0d 6c 6f 6e 67 20 |urnRecPt|r;.long | |00003af0| 72 65 73 75 6c 74 50 72 | 6f 63 3b 0d 63 68 61 72 |resultPr|oc;.char| |00003b00| 20 2a 75 73 65 72 44 61 | 74 61 50 74 72 3b 0d 7b | *userDa|taPtr;.{| |00003b10| 0d 20 20 20 20 69 66 20 | 28 64 6e 72 20 3d 3d 20 |. if |(dnr == | |00003b20| 6e 69 6c 29 0d 20 20 20 | 20 20 20 20 20 2f 2a 20 |nil). | /* | |00003b30| 72 65 73 6f 6c 76 65 72 | 20 6e 6f 74 20 6c 6f 61 |resolver| not loa| |00003b40| 64 65 64 20 65 72 72 6f | 72 20 2a 2f 0d 20 20 20 |ded erro|r */. | |00003b50| 20 20 20 20 20 72 65 74 | 75 72 6e 28 6e 6f 74 4f | ret|urn(notO| |00003b60| 70 65 6e 45 72 72 29 3b | 0d 0d 20 20 20 20 72 65 |penErr);|.. re| |00003b70| 74 75 72 6e 28 43 61 6c | 6c 48 49 6e 66 6f 50 72 |turn(Cal|lHInfoPr| |00003b80| 6f 63 28 28 48 49 6e 66 | 6f 55 50 50 29 20 64 6e |oc((HInf|oUPP) dn| |00003b90| 72 2c 20 48 49 4e 46 4f | 2c 20 68 6f 73 74 4e 61 |r, HINFO|, hostNa| |00003ba0| 6d 65 2c 20 28 76 6f 69 | 64 2a 29 20 72 65 74 75 |me, (voi|d*) retu| |00003bb0| 72 6e 52 65 63 50 74 72 | 2c 0d 20 20 20 20 20 20 |rnRecPtr|,. | |00003bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003bd0| 20 20 72 65 73 75 6c 74 | 50 72 6f 63 2c 20 75 73 | result|Proc, us| |00003be0| 65 72 44 61 74 61 50 74 | 72 29 29 3b 0d 7d 0d 0d |erDataPt|r));.}..| |00003bf0| 0d 0d 74 79 70 65 64 65 | 66 20 4f 53 45 72 72 20 |..typede|f OSErr | |00003c00| 28 2a 4d 58 49 6e 66 6f | 50 72 6f 63 50 74 72 29 |(*MXInfo|ProcPtr)| |00003c10| 28 6c 6f 6e 67 20 73 65 | 6c 65 63 74 6f 72 2c 20 |(long se|lector, | |00003c20| 63 68 61 72 2a 20 68 6f | 73 74 4e 61 6d 65 2c 20 |char* ho|stName, | |00003c30| 73 74 72 75 63 74 20 72 | 65 74 75 72 6e 52 65 63 |struct r|eturnRec| |00003c40| 2a 20 72 65 74 75 72 6e | 52 65 63 50 74 72 2c 0d |* return|RecPtr,.| |00003c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00003c70| 6c 6f 6e 67 20 72 65 73 | 75 6c 74 50 72 6f 63 2c |long res|ultProc,| |00003c80| 20 63 68 61 72 2a 20 75 | 73 65 72 44 61 74 61 29 | char* u|serData)| |00003c90| 3b 0d 0d 65 6e 75 6d 20 | 7b 0d 20 20 20 20 75 70 |;..enum |{. up| |00003ca0| 70 4d 58 49 6e 66 6f 50 | 72 6f 63 49 6e 66 6f 20 |pMXInfoP|rocInfo | |00003cb0| 3d 20 6b 43 53 74 61 63 | 6b 42 61 73 65 64 0d 20 |= kCStac|kBased. | |00003cc0| 20 20 20 20 20 20 20 20 | 7c 20 52 45 53 55 4c 54 | || RESULT| |00003cd0| 5f 53 49 5a 45 28 53 49 | 5a 45 5f 43 4f 44 45 28 |_SIZE(SI|ZE_CODE(| |00003ce0| 73 69 7a 65 6f 66 28 6c | 6f 6e 67 29 29 29 0d 20 |sizeof(l|ong))). | |00003cf0| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |00003d00| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |00003d10| 52 28 31 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(1, SIZ|E_CODE(s| |00003d20| 69 7a 65 6f 66 28 73 68 | 6f 72 74 29 29 29 0d 20 |izeof(sh|ort))). | |00003d30| 20 20 20 20 20 20 20 20 | 7c 20 53 54 41 43 4b 5f | || STACK_| |00003d40| 52 4f 55 54 49 4e 45 5f | 50 41 52 41 4d 45 54 45 |ROUTINE_|PARAMETE| |00003d50| 52 28 32 2c 20 53 49 5a | 45 5f 43 4f 44 45 28 73 |R(2, SIZ|E_CODE(s| |00003d60| 69 7a 65 6f 66 28 63 68 | 61 72 20 2a 29 29 29 0d |izeof(ch|ar *))).| |00003d70| 20 20 20 20 20 20 20 20 | 20 7c 20 53 54 41 43 4b | | | STACK| |00003d80| 5f 52 4f 55 54 49 4e 45 | 5f 50 41 52 41 4d 45 54 |_ROUTINE|_PARAMET| |00003d90| 45 52 28 33 2c 20 53 49 | 5a 45 5f 43 4f 44 45 28 |ER(3, SI|ZE_CODE(| |00003da0| 73 69 7a 65 6f 66 28 73 | 74 72 75 63 74 20 72 65 |sizeof(s|truct re| |00003db0| 74 75 72 6e 52 65 63 20 | 2a 29 29 29 0d 20 20 20 |turnRec |*))). | |00003dc0| 20 20 20 20 20 20 7c 20 | 53 54 41 43 4b 5f 52 4f | | |STACK_RO| |00003dd0| 55 54 49 4e 45 5f 50 41 | 52 41 4d 45 54 45 52 28 |UTINE_PA|RAMETER(| |00003de0| 34 2c 20 53 49 5a 45 5f | 43 4f 44 45 28 73 69 7a |4, SIZE_|CODE(siz| |00003df0| 65 6f 66 28 6c 6f 6e 67 | 29 29 29 0d 20 20 20 20 |eof(long|))). | |00003e00| 20 20 20 20 20 7c 20 53 | 54 41 43 4b 5f 52 4f 55 | | S|TACK_ROU| |00003e10| 54 49 4e 45 5f 50 41 52 | 41 4d 45 54 45 52 28 35 |TINE_PAR|AMETER(5| |00003e20| 2c 20 53 49 5a 45 5f 43 | 4f 44 45 28 73 69 7a 65 |, SIZE_C|ODE(size| |00003e30| 6f 66 28 63 68 61 72 20 | 2a 29 29 29 0d 0d 7d 3b |of(char |*)))..};| |00003e40| 0d 0d 23 69 66 20 55 53 | 45 53 52 4f 55 54 49 4e |..#if US|ESROUTIN| |00003e50| 45 44 45 53 43 52 49 50 | 54 4f 52 53 0d 74 79 70 |EDESCRIP|TORS.typ| |00003e60| 65 64 65 66 20 55 6e 69 | 76 65 72 73 61 6c 50 72 |edef Uni|versalPr| |00003e70| 6f 63 50 74 72 20 4d 58 | 49 6e 66 6f 55 50 50 3b |ocPtr MX|InfoUPP;| |00003e80| 0d 0d 23 64 65 66 69 6e | 65 20 4e 65 77 4d 58 49 |..#defin|e NewMXI| |00003e90| 6e 66 6f 50 72 6f 63 28 | 75 73 65 72 52 6f 75 74 |nfoProc(|userRout| |00003ea0| 69 6e 65 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |ine) | | |00003eb0| 20 20 20 20 20 20 20 20 | 20 20 5c 0d 20 20 20 20 | | \. | |00003ec0| 20 20 20 20 28 4d 58 49 | 6e 66 6f 55 50 50 29 20 | (MXI|nfoUPP) | |00003ed0| 4e 65 77 52 6f 75 74 69 | 6e 65 44 65 73 63 72 69 |NewRouti|neDescri| |00003ee0| 70 74 6f 72 28 75 73 65 | 72 52 6f 75 74 69 6e 65 |ptor(use|rRoutine| |00003ef0| 2c 20 75 70 70 4d 58 49 | 6e 66 6f 50 72 6f 63 49 |, uppMXI|nfoProcI| |00003f00| 6e 66 6f 2c 20 47 65 74 | 43 75 72 72 65 6e 74 49 |nfo, Get|CurrentI| |00003f10| 53 41 28 29 29 0d 23 64 | 65 66 69 6e 65 20 43 61 |SA()).#d|efine Ca| |00003f20| 6c 6c 4d 58 49 6e 66 6f | 50 72 6f 63 28 75 73 65 |llMXInfo|Proc(use| |00003f30| 72 52 6f 75 74 69 6e 65 | 2c 20 73 65 6c 65 63 74 |rRoutine|, select| |00003f40| 6f 72 2c 20 68 6f 73 74 | 4e 61 6d 65 2c 20 72 65 |or, host|Name, re| |00003f50| 74 75 72 6e 52 65 63 50 | 74 72 2c 20 72 65 73 75 |turnRecP|tr, resu| |00003f60| 6c 74 50 72 6f 63 2c 20 | 75 73 65 72 44 61 74 61 |ltProc, |userData| |00003f70| 29 20 5c 0d 20 20 20 20 | 20 20 20 20 43 61 6c 6c |) \. | Call| |00003f80| 55 6e 69 76 65 72 73 61 | 6c 50 72 6f 63 28 75 73 |Universa|lProc(us| |00003f90| 65 72 52 6f 75 74 69 6e | 65 2c 20 73 65 6c 65 63 |erRoutin|e, selec| |00003fa0| 74 6f 72 2c 20 68 6f 73 | 74 4e 61 6d 65 2c 20 72 |tor, hos|tName, r| |00003fb0| 65 74 75 72 6e 52 65 63 | 50 74 72 2c 20 72 65 73 |eturnRec|Ptr, res| |00003fc0| 75 6c 74 50 72 6f 63 2c | 20 75 73 65 72 44 61 74 |ultProc,| userDat| |00003fd0| 61 29 0d 23 65 6c 73 65 | 0d 74 79 70 65 64 65 66 |a).#else|.typedef| |00003fe0| 20 4d 58 49 6e 66 6f 50 | 72 6f 63 50 74 72 20 4d | MXInfoP|rocPtr M| |00003ff0| 58 49 6e 66 6f 55 50 50 | 3b 0d 0d 23 64 65 66 69 |XInfoUPP|;..#defi| |00004000| 6e 65 20 4e 65 77 4d 58 | 49 6e 66 6f 50 72 6f 63 |ne NewMX|InfoProc| |00004010| 28 75 73 65 72 52 6f 75 | 74 69 6e 65 29 20 20 20 |(userRou|tine) | |00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | | |00004030| 20 20 20 5c 0d 20 20 20 | 20 20 20 20 20 28 4d 58 | \. | (MX| |00004040| 49 6e 66 6f 55 50 50 29 | 28 75 73 65 72 52 6f 75 |InfoUPP)|(userRou| |00004050| 74 69 6e 65 29 0d 23 64 | 65 66 69 6e 65 20 43 61 |tine).#d|efine Ca| |00004060| 6c 6c 4d 58 49 6e 66 6f | 50 72 6f 63 28 75 73 65 |llMXInfo|Proc(use| |00004070| 72 52 6f 75 74 69 6e 65 | 2c 20 73 65 6c 65 63 74 |rRoutine|, select| |00004080| 6f 72 2c 20 68 6f 73 74 | 4e 61 6d 65 2c 20 72 65 |or, host|Name, re| |00004090| 74 75 72 6e 52 65 63 50 | 74 72 2c 20 72 65 73 75 |turnRecP|tr, resu| |000040a0| 6c 74 50 72 6f 63 2c 20 | 75 73 65 72 44 61 74 61 |ltProc, |userData| |000040b0| 29 20 5c 0d 20 20 20 20 | 20 20 20 20 28 2a 75 73 |) \. | (*us| |000040c0| 65 72 52 6f 75 74 69 6e | 65 29 28 73 65 6c 65 63 |erRoutin|e)(selec| |000040d0| 74 6f 72 2c 20 68 6f 73 | 74 4e 61 6d 65 2c 20 72 |tor, hos|tName, r| |000040e0| 65 74 75 72 6e 52 65 63 | 50 74 72 2c 20 72 65 73 |eturnRec|Ptr, res| |000040f0| 75 6c 74 50 72 6f 63 2c | 20 75 73 65 72 44 61 74 |ultProc,| userDat| |00004100| 61 29 0d 23 65 6e 64 69 | 66 0d 0d 0d 70 61 73 63 |a).#endi|f...pasc| |00004110| 61 6c 20 20 4f 53 45 72 | 72 20 4d 58 49 6e 66 6f |al OSEr|r MXInfo| |00004120| 28 68 6f 73 74 4e 61 6d | 65 2c 20 72 65 74 75 72 |(hostNam|e, retur| |00004130| 6e 52 65 63 50 74 72 2c | 20 72 65 73 75 6c 74 50 |nRecPtr,| resultP| |00004140| 72 6f 63 2c 20 75 73 65 | 72 44 61 74 61 50 74 72 |roc, use|rDataPtr| |00004150| 29 0d 63 68 61 72 20 2a | 68 6f 73 74 4e 61 6d 65 |).char *|hostName| |00004160| 3b 0d 73 74 72 75 63 74 | 20 72 65 74 75 72 6e 52 |;.struct| returnR| |00004170| 65 63 20 2a 72 65 74 75 | 72 6e 52 65 63 50 74 72 |ec *retu|rnRecPtr| |00004180| 3b 0d 6c 6f 6e 67 20 72 | 65 73 75 6c 74 50 72 6f |;.long r|esultPro| |00004190| 63 3b 0d 63 68 61 72 20 | 2a 75 73 65 72 44 61 74 |c;.char |*userDat| |000041a0| 61 50 74 72 3b 0d 7b 0d | 20 20 20 20 69 66 20 28 |aPtr;.{.| if (| |000041b0| 64 6e 72 20 3d 3d 20 6e | 69 6c 29 0d 20 20 20 20 |dnr == n|il). | |000041c0| 20 20 20 20 2f 2a 20 72 | 65 73 6f 6c 76 65 72 20 | /* r|esolver | |000041d0| 6e 6f 74 20 6c 6f 61 64 | 65 64 20 65 72 72 6f 72 |not load|ed error| |000041e0| 20 2a 2f 0d 20 20 20 20 | 20 20 20 20 72 65 74 75 | */. | retu| |000041f0| 72 6e 28 6e 6f 74 4f 70 | 65 6e 45 72 72 29 3b 0d |rn(notOp|enErr);.| |00004200| 0d 20 20 20 20 72 65 74 | 75 72 6e 28 43 61 6c 6c |. ret|urn(Call| |00004210| 4d 58 49 6e 66 6f 50 72 | 6f 63 28 28 4d 58 49 6e |MXInfoPr|oc((MXIn| |00004220| 66 6f 55 50 50 29 20 64 | 6e 72 2c 20 4d 58 49 4e |foUPP) d|nr, MXIN| |00004230| 46 4f 2c 20 68 6f 73 74 | 4e 61 6d 65 2c 20 72 65 |FO, host|Name, re| |00004240| 74 75 72 6e 52 65 63 50 | 74 72 2c 20 72 65 73 75 |turnRecP|tr, resu| |00004250| 6c 74 50 72 6f 63 2c 20 | 75 73 65 72 44 61 74 61 |ltProc, |userData| |00004260| 50 74 72 29 29 3b 0d 7d | 0d 00 00 00 00 00 00 00 |Ptr));.}|........| |00004270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004280| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F| |00004290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |000042a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |000042b0| 05 64 6e 72 2e 63 02 00 | 00 00 50 61 72 74 53 49 |.dnr.c..|..PartSI| |000042c0| 54 21 00 00 00 00 00 00 | 00 00 00 02 ab c6 00 00 |T!......|........| |000042d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......| |000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000042f0| 00 00 ab f8 9c 8f 00 00 | 00 00 00 00 01 9a 74 72 |........|......tr| |00004300| 69 6e 67 2e 0d 09 0d 09 | 45 78 69 74 3a 09 2a 73 |ing.....|Exit:.*s| |00004310| 74 72 20 3d 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |tr = poi|nter to | |00004320| 66 69 72 73 74 20 63 68 | 61 72 61 63 74 65 72 20 |first ch|aracter | |00004330| 66 6f 6c 6c 6f 77 69 6e | 67 20 73 6b 69 70 70 65 |followin|g skippe| |00004340| 64 20 77 68 69 74 65 20 | 73 70 61 63 65 0d 09 09 |d white |space...| |00004350| 09 09 61 6e 64 20 63 6f | 6d 6d 65 6e 74 73 2e 0d |..and co|mments..| |00004360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00004370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------| |00004380| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....| |00004390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |000043a0| 00 00 00 00 00 00 00 03 | 00 04 00 6a 00 09 01 d0 |........|...j....| |000043b0| 02 68 00 6a 00 09 01 d0 | 02 68 ab f7 d1 43 00 00 |.h.j....|.h...C..| |000043c0| 33 b4 00 00 33 b4 00 00 | 33 68 01 00 00 00 00 04 |3...3...|3h......| |000043d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T| |000043e0| 00 00 00 46 00 68 5b d8 | 16 0a 00 00 00 1c 00 46 |...F.h[.|.......F| |000043f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..| |00004400| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........| |00004410| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........| |00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00004470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+